-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathSwitcharoo.java
More file actions
42 lines (33 loc) · 894 Bytes
/
Switcharoo.java
File metadata and controls
42 lines (33 loc) · 894 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
39
40
41
42
import java.util.Scanner;
public class Switcharoo {
public static void main(String[] args) {
int choice = 140;
int choice1 = -42;
int choice2 = 85;
Scanner s =new Scanner(System.in);
System.out.println("Enter a choice");
choice = s.nextInt();
switch (choice){
case 100:
System.out.printf("You have earned the letter grade :A");
break;
case 85:
System.out.printf("You have earned the letter grade : B\n end of program");
break;
case 70:
System.out.printf("You have earned the letter grade : C");
break;
case 60:
System.out.printf("You have earned the letter grade : D");
break;
case 280/2:
//choice = 140;
case -84/2:
//choice = -42;
System.out.println("ERROR You have entered and invaled grade");
default:
System.out.println("end of program");
break;
}
}
}