-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSwitch case
More file actions
34 lines (27 loc) · 820 Bytes
/
Copy pathSwitch case
File metadata and controls
34 lines (27 loc) · 820 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
import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
int a=18;
int b=6;
Scanner sc = new Scanner(System.in);
//float avg=sc.nextFloat();//float input
int age=sc.nextInt();
char grade='D';
switch(grade)
{
case 'A':
System.out.println("Your grade is very good");
break;
case 'B':
System.out.println("Very good ,keep learning:");
break;
case 'C':
System.out.println("Nice keep going");
break;
default:
System.out.println("Wrong argument");
}
}
}