-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgradepercentage.java
More file actions
38 lines (26 loc) · 1.1 KB
/
gradepercentage.java
File metadata and controls
38 lines (26 loc) · 1.1 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
import java.util.*;
public class gradepercentage {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("\n\nfind the marks percentage\n\n~~~~~~~~~~~~~~");
System.out.println("enter total marks out of ");
int total = sc.nextInt();
System.out.println("enter the marks in English ");
int a = sc.nextInt();
System.out.println("enter the marks in maths ");
int b = sc.nextInt();
System.out.println("enter the marks in hindi ");
int c = sc.nextInt();
System.out.println("enter the marks in Science ");
int d = sc.nextInt();
System.out.println("enter the marks in SocialScience ");
int e = sc.nextInt();
System.out.println("enter the marks in languge ");
int f = sc.nextInt();
int marks = (a + b + c + d + e + f);
float out = (total * 6);
float percentage = (marks / out) * 100.0f;
System.out.println("total marks is : " + marks);
System.out.println("the percentage of marks is :" + percentage);
}
}