-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPercentageCalulator.java
More file actions
70 lines (26 loc) · 1.04 KB
/
Copy pathPercentageCalulator.java
File metadata and controls
70 lines (26 loc) · 1.04 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
58
59
60
61
62
63
64
65
66
67
68
69
70
import java.util.Scanner;
public class PercentageCalulator {
public static void main(String[] args) {
System.out.println("Taking Percentage From User");
Scanner sc = new Scanner(System.in);
System.out.println("Enter the Marks of English");
float a = sc.nextFloat();
System.out.println("Enter the Marks of Maths");
float b= sc.nextFloat();
System.out.println("Enter the Marks of Physics");
float c = sc.nextFloat();
System.out.println("Enter the Marks of Chemistry");
float d = sc.nextFloat();
System.out.println("Enter the Marks of Geography");
float f= sc.nextFloat();
System.out.println("Enter the Marks of IT");
float e = sc.nextFloat();
float sum = a+b+c+d+e + f;
System.out.println("The sum is ");
System.out.println(sum);
float div = sum/600;
float mul = div * 100;
System.out.println("the Percentage is ");
System.out.println(mul);
}
}