-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSelections.java
More file actions
33 lines (26 loc) · 978 Bytes
/
Copy pathSelections.java
File metadata and controls
33 lines (26 loc) · 978 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
import java.util.Scanner;
public class Selections {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
//System.out.println("Enter an integer:");
//int number = input.nextInt();
//if(number > 0){
// if(number % 2 == 0){
// System.out.println(number + " is an even number");
// }else {
// System.out.println(number + " is an odd number");
// }
//}else{
// System.out.println(number+ " is a negative integer");
//}
//System.out.println("\n================================");
System.out.println("Enter student mark: " );
double mark = input.nextDouble();
if (mark >= 80.0) {
System.out.println(mark + "is a first class");
} else if ((mark >= 70.0) &&(mark < 80)) {
System.out.println(mark + "is a second class");
}
input.close();
}
}