-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdigitToString.java
More file actions
42 lines (39 loc) · 1.11 KB
/
digitToString.java
File metadata and controls
42 lines (39 loc) · 1.11 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
42
import java.util.Scanner;
public class digitToString {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("Enter a number=");
int a = scanner.nextInt();
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:
break;
}
}
}