-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDigitToWord.java
More file actions
41 lines (40 loc) · 1.12 KB
/
DigitToWord.java
File metadata and controls
41 lines (40 loc) · 1.12 KB
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
import java.util.Scanner;
public class DigitToWord {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
byte a = scanner.nextByte();
switch (a) {
case 1:
System.out.println("ONE");
break;
case 2:
System.out.println("TWO");
break;
case 3:
System.out.println("THREE");
break;
case 4:
System.out.println("FOUR");
break;
case 5:
System.out.println("FIVE");
break;
case 6:
System.out.println("SIX");
break;
case 7:
System.out.println("SEVEN");
break;
case 8:
System.out.println("EIGHT");
break;
case 9:
System.out.println("NINE");
break;
default:
System.out.println("Enter Single Digit Integer");
break;
}
scanner.close();
}
}