-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPrintinwords.java
More file actions
62 lines (50 loc) · 1.32 KB
/
Printinwords.java
File metadata and controls
62 lines (50 loc) · 1.32 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import java.util.Scanner;
public class Printinwords {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner s= new Scanner(System.in);
int number;
System.out.println("enter number");
number= s.nextInt();
if(number==1)
{
System.out.println("ONE");
}
else if(number==2)
{
System.out.println("TWO");
}
else if(number==3)
{
System.out.println("THREE");
}
else if(number==4)
{
System.out.println("FOUR");
}
else if(number==5)
{
System.out.println("FIVE");
}
else if(number==6)
{
System.out.println("SIX");
}
else if(number==7)
{
System.out.println("SEVEN");
}
else if(number==8)
{
System.out.println("EIGHT");
}
else if(number==9)
{
System.out.println("NINE");
}
else
{
System.out.println("OTHERS");
}
}
}