-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDemo6.java
More file actions
57 lines (52 loc) · 1.26 KB
/
Demo6.java
File metadata and controls
57 lines (52 loc) · 1.26 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
56
57
import java.util.Scanner;
class A
{
A()
{
Scanner sc=new Scanner(System.in);
System.out.print("Enter Name: ");
String name=sc.next();
System.out.print("Enter English : ");
int e=sc.nextInt();
System.out.print("Enter Hindi : ");
int h=sc.nextInt();
System.out.print("Enter Kannada: ");
int k=sc.nextInt();
System.out.print("Enter Science : ");
int s=sc.nextInt();
System.out.print("Enter Social : ");
int ss=sc.nextInt();
System.out.print("Enter mathamatics : ");
int m=sc.nextInt();
int marks =e+h+k+s+ss+m;
int res =marks /6 ;
System.out.println("My Result is "+ res );
if(res > 85 )
{
System.out.println(" Hi "+ name+ " your marks is "+marks +" And you got Distinction .....!");
}
else if(res < 85 && res > 60 )
{
System.out.println(" Hi "+ name+ " your marks is "+marks +" And you got First class .....!");
}
else if( res > 50 && res < 60 )
{
System.out.println(" Hi "+ name+ " your marks is "+marks + " And you got Second class" );
}
else if (res > 35 && res < 50 )
{
System.out.println(" Hi "+ name+ "your marks is "+marks +" And you got Just Pass " );
}
else
{
System.out.println("FAIL ");
}
}
}
class Demo6
{
public static void main(String args[])
{
A a =new A();
}
}