-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcbsecalculator.java
27 lines (20 loc) · 1.03 KB
/
cbsecalculator.java
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
import java.util.Scanner;
public class cbsecalculator {
public static void main(String[] args) {
System.out.println("practice cbse calculator");
Scanner scan = new Scanner(System.in);
System.out.println("Enter your Physics marks : ");
int physics = scan.nextInt();
System.out.println("Enter your English marks : ");
int English = scan.nextInt();
System.out.println("Enter your Chemistry marks : ");
int chemistry = scan.nextInt();
System.out.println("Enter your Mathematics marks : ");
int mathematics = scan.nextInt();
System.out.println("Enter your Computer Science marks : ");
int computer = scan.nextInt();
float percentage = ((physics + English + chemistry + mathematics + computer)/500.0f)*100;
System.out.println("percentage : ");
System.out.println(percentage);
}
}