Program To Convert Digit To Word.
#include stdio.h // friend's this blog page considering this including file as html tags so why
#include conio.h // I removed brackets.
void main()
{
long n;
int i,m;
char *a[30]={"zero","one","two","three","four","five","six","seven","eight","nine","ten"};
printf("Enter Your Number=");
scanf("%ld",&n);
for(i=0;n>0;n=n/10)
{
i=i*10;
i=i+(n%10);
}
m=i;
for(i=0;m>0;m=m/10)
{
i=i+(m%10);
printf("%s ",a[i]);
i=0;
}
}
/* Output:--
Enter Your Number=754624984
seven five four six two four nine eight four
--------------------------------
Process exited after 8.33 seconds with return value 0
Press any key to continue . . .*/
Comments
I need reverse program like
Input: eighty six
Output: 86
Please Tell Me What Was Your Exact Problem.
This Code Is Running.Please Check Your Editor You are using.
It's May Be Editors Problem.
for(i=0;i<10 br="" i=""> {
for(j=0;j<9 br="" j=""> {
when i put ";" in between the br="" & i<10 it is saying can't convert char to int. and also br is not declared in the main