-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest1.java
More file actions
25 lines (19 loc) · 731 Bytes
/
test1.java
File metadata and controls
25 lines (19 loc) · 731 Bytes
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
import java.util.Scanner;
public class test1 {
public static void main(String[]args){
Scanner sc = new Scanner(System.in);
System.out.println("Enter Subject NO 1 Mark :");
int a = sc.nextInt();
System.out.println("Enter Subject NO 2 Mark :");
int b = sc.nextInt();
System.out.println("Enter Subject NO 3 Mark :");
int c = sc.nextInt();
System.out.println("Enter Subject NO 4 Mark :");
int d = sc.nextInt();
System.out.println("Enter Subject NO 5 Mark :");
int e = sc.nextInt();
int sum = a+b+c+d+e;
double per = (sum/500.0)*100.0;
System.out.println("Percentage is : "+ per);
}
}