what im trying to do is ask for input
say 123 then have it display one two three in english
i think im on the right track but when the digits are extracted one by one the number = 0 then how can case work then?
Code:
#include
#include
int main(int argc, char *argv[])
{
int number,right,placecount;
printf("\n%25cNumbers to words converter\n",0);
printf("\nEnter the number:");
scanf("%i", &number);
do
{
right = number %10;
number = number /10;
++placecount;
}
while(number!=0);
do
{
switch(right)
{
case '0':
printf("zero\n");
break;
case '1':
printf("one\n");
break;
default:
break;
}
}
while(placecount >0);
system("PAUSE");
return 0;
}