NAME:SHIVANJALI BARKUND
CLASS:FE,DIV :7
ROLL NO: 7014
// To read the integer number and display it in english words.
#include<stdio.h>
int main()
{
int n,m=0,x;
scanf("%d",&n);
while(n>0)
{
m=m*10;
m=m+n%10;
n=n/10;
}
while(m>0)
{
x=m%10;
switch(x)
{
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("eight");
break;
case 9: printf("nine");
break;
}
m=m/10;
}
return(0);
}
output:
1423
onefourtwothree