-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainclass.java
More file actions
55 lines (50 loc) · 1.12 KB
/
mainclass.java
File metadata and controls
55 lines (50 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import MCA.*;
import java.util.*;
public class mainclass {
public static void main(String args[])
{
int rn;
String name;
int m1,m2,m3,m4;
Scanner sc=new Scanner(System.in);
System.out.println("enter details :");
name=sc.next();
rn=sc.nextInt();
m1=sc.nextInt();
m2=sc.nextInt();
m3=sc.nextInt();
m4=sc.nextInt();
student obj=new student(rn,name,m1,m2,m3,m4);
obj.display();
int total=m1+m2+m3+m4;
float percentage=total/4;
System.out.println("TOTAL: "+total+ "Percentage="+percentage);
}
}
/*
*
*
* import MCA.*;
import java.util.*;
public class mainclass {
public static void main(String args[])
{
int rn;
String name;
int m1,m2,m3,m4;
Scanner sc=new Scanner(System.in);
System.out.println("enter details :");
name=sc.next();
rn=sc.nextInt();
m1=sc.nextInt();
m2=sc.nextInt();
m3=sc.nextInt();
m4=sc.nextInt();
student obj=new student(rn,name,m1,m2,m3,m4);
obj.display();
int total=m1+m2+m3+m4;
float percentage=total/4;
System.out.println("TOTAL: "+total+ "Percentage="+percentage);
}
}
*/