-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpercen.java
More file actions
28 lines (18 loc) · 832 Bytes
/
Copy pathpercen.java
File metadata and controls
28 lines (18 loc) · 832 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
26
27
28
import java.util.Scanner;
class percen {
public static void main(String [] args){
Scanner sc = new Scanner(System.in);
System.out.println("Enter the marks of subject 1 ");
float maths = sc.nextFloat();
System.out.println("Enter the marks of subject 2 ");
float english = sc.nextFloat();
System.out.println("Enter the marks of subject 3 ");
float science = sc.nextFloat();
System.out.println("Enter the marks of subject 4 ");
float physics = sc.nextFloat();
System.out.println("Enter the marks of subject 5 ");
float computer = sc.nextFloat();
float total = ((maths + english + science + physics + computer)/5);
System.out.println("totla percentage of your marks are "+total);
}
}