Posts

Program To Convert Number In Word To Digit In C Language

#include  stdio.h        // friend's  this blog page considering this including file as html tags so why #include  conio.h     // I removed brackets. #include  string.h #include  math.h void main() {     char no[70];     char *st;     int i,m=0,j,k,l,n,p,q;         char *a[50][50]={{"Zero","","","","","","","","",},{"One","Ten","One Hundred","One Thousand","Ten Thousand","One Lakh","Ten Lakh","One Crore","Ten Crore"},                      {"Two","Twenty","Two Hundred","Two Thousand","Twenty Thousand","Two Lakh","Twenty Lakh","Two Crore","Twenty Crore"},                      {"Three","Thirty","Three Hundred","Three Thousand","Thirty Thousand","Three L

Program To Convert Upto 9 Digit Number To Words

#include  stdio.h       // friend's  this blog page considering this including file as html tags so why  #include  conio.h       // I removed brackets. int val(int); void main() {     long n;     int i,m,j=0,k,l;     char *a[20][20]={{"Zero","","","","","","","","",},{"","One","Ten","One Hundred","One Thousand","Ten Thousand","One Lakh","Ten Lakh","One Crore","Ten Crore"},                      {"","Two","Twenty","Two Hundred","Two Thousand","Twenty Thousand","Two Lakh","Twenty Lakh","Two Crore","Twenty Crore"},                      {"","Three","Thirty","Three Hundred","Three Thousand","Thirty Thousand","Three Lakh",&qu

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 . . .*/