c program to Accept any number from user and convert into word
#include"stdio.h"
#include"conio.h"
void main()
{
int no,i=0,a[10];
clrscr();
printf("Enter any number=");
scanf("%d",&no);
while(no>0)
{
a[i++]=no%10;
no=no/10;
}
for(i=i-1;i>=0;i--)
{
switch(a[i])
{
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;
}
}
getch();
}