#include <stdio.h>
#include<conio.h>
int main ()
{
char a[100];
int i;
clrscr();
printf("Enter a number: ");
gets(a);
for(i=0;i<a[i];i++)
{
if(a[i]=='0')
printf("Zero ");
else if(a[i]=='1')
printf("One ");
else if(a[i]=='2')
printf("Two ");
else if(a[i]=='3')
printf("Three ");
else if(a[i]=='4')
printf("Four ");
else if(a[i]=='5')
printf("Five ");
else if(a[i]=='6')
printf("Six ");
else if(a[i]=='7')
printf("Seven ");
else if(a[i]=='8')
printf("Eight ");
else if(a[i]=='9')
printf("Nine ");
}
getch();
}
#include<conio.h>
int main ()
{
char a[100];
int i;
clrscr();
printf("Enter a number: ");
gets(a);
for(i=0;i<a[i];i++)
{
if(a[i]=='0')
printf("Zero ");
else if(a[i]=='1')
printf("One ");
else if(a[i]=='2')
printf("Two ");
else if(a[i]=='3')
printf("Three ");
else if(a[i]=='4')
printf("Four ");
else if(a[i]=='5')
printf("Five ");
else if(a[i]=='6')
printf("Six ");
else if(a[i]=='7')
printf("Seven ");
else if(a[i]=='8')
printf("Eight ");
else if(a[i]=='9')
printf("Nine ");
}
getch();
}
This comment has been removed by the author.
ReplyDeletedoesn't work
ReplyDelete