-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAssignment6_2.c
More file actions
68 lines (52 loc) · 1.01 KB
/
Assignment6_2.c
File metadata and controls
68 lines (52 loc) · 1.01 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
63
64
65
66
67
68
// 2.. Accept single digit number from user and print it into word
#include<stdio.h>
void Display(int iNo)
{
switch (iNo)
{
case 0:
printf("Zero\n");
break;
case 1:
printf("First\n");
break;
case 2:
printf("Two\n");
break;
case 3:
printf("Third\n");
break;
case 4:
printf("Four\n");
break;
case 5:
printf("Five\n");
break;
case 6:
printf("Six\n");
break;
case 7:
printf("Seven\n");
break;
case 8:
printf("Eight\n");
break;
case 9:
printf("Nine\n");
break;
case 10:
printf("Ten\n");
break;
default:
printf("Invalid number \n");
break;
}
}
int main()
{
int iValue = 0;
printf("Enter number \n");
scanf("%d",&iValue);
Display(iValue);
return 0;
}