#include<stdio.h>
#include<conio.h>
main()
{
int n;
clrscr();
printf("Enter number...");
scanf("%1d",&n); //%1d to scan single integer
switch(n)
{
case 0 : printf("Zero");break;
case 1 : printf("One");break;
case 2 : printf("Two");break;
case 3 : printf("Three");break;
case 4 : printf("Four");break;
case 5 : printf("Five");break;
case 6 : printf("Six");break;
case 7 : printf("Seven ");break;
case 8 : printf("Eigth ");break;
case 9 : printf("Nine ");break;
}
getch();
}
- #include<stdio.h>
- #include<conio.h>
- main()
- {
- int n;
- clrscr();
- printf("Enter number...");
- scanf("%1d",&n); //%1d to scan single integer
- switch(n)
- {
- case 0 : printf("Zero");break;
- case 1 : printf("One");break;
- case 2 : printf("Two");break;
- case 3 : printf("Three");break;
- case 4 : printf("Four");break;
- case 5 : printf("Five");break;
- case 6 : printf("Six");break;
- case 7 : printf("Seven ");break;
- case 8 : printf("Eigth ");break;
- case 9 : printf("Nine ");break;
- }
- getch();
- }
#include<stdio.h>
#include<conio.h>
main()
{
int n;
clrscr();
printf("Enter number...");
scanf("%1d",&n); //%1d to scan single integer
switch(n)
{
case 0 : printf("Zero");break;
case 1 : printf("One");break;
case 2 : printf("Two");break;
case 3 : printf("Three");break;
case 4 : printf("Four");break;
case 5 : printf("Five");break;
case 6 : printf("Six");break;
case 7 : printf("Seven ");break;
case 8 : printf("Eigth ");break;
case 9 : printf("Nine ");break;
}
getch();
}