forked from deepdalsania/tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLadder_If.java
More file actions
38 lines (30 loc) · 995 Bytes
/
Ladder_If.java
File metadata and controls
38 lines (30 loc) · 995 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
29
30
31
32
33
34
35
36
37
38
package loop;
import java.util.Scanner;
public class Ladder_If {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner s = new Scanner(System.in);
System.out.println("Enter the marks of FIVE subjects out of 100 = ");
int m1 = s.nextInt();
int m2 = s.nextInt();
int m3 = s.nextInt();
int m4 = s.nextInt();
int m5 = s.nextInt();
int tot = m1 + m2 + m3 + m4 + m5;
float avg = (float) tot / 5;
System.out.println("Total marks is : " + tot);
System.out.println("Average is : " + avg);
/*
* if(p >= 90){ System.out.println("You are pass with FIRST CLASS"); }else if (p
* >= 70 && p <= 90 ) { System.out.println("You are pass with SECOND CLASS");
* }else if(p >= 50 && p <= 70){
* System.out.println("You are pass with DISTINCT CLASS"); }else if(p >= 30 && p
* <= 50){ System.out.println("You are pass with PASS CLASS"); } else{
* System.out.println("You are FAIL"); }
*/
s.close();
}
}