Skip to content

Commit 12d5098

Browse files
Create arpit.tripathi.md
1 parent 75d937d commit 12d5098

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

arpit.tripathi.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
public class Test {
2+
3+
public static void main(String args[]) {
4+
// char grade = args[0].charAt(0);
5+
char grade = 'C';
6+
7+
switch(grade) {
8+
case 'A' :
9+
System.out.println("Excellent!");
10+
break;
11+
case 'B' :
12+
case 'C' :
13+
System.out.println("Well done");
14+
break;
15+
case 'D' :
16+
System.out.println("You passed");
17+
case 'F' :
18+
System.out.println("Better try again");
19+
break;
20+
default :
21+
System.out.println("Invalid grade");
22+
}
23+
System.out.println("Your grade is " + grade);
24+
}
25+
}

0 commit comments

Comments
 (0)