void numToEnglish(unsigned int num, char english[]);
main()
{
char* first20[] = {"zero", "one", "two", "three", "four", "five",
"six", "seven", "eight", "nine", "ten", "eleven",
"twelve", "thirteen", "fourteen", "fifteen", "sixteen",
"seventeen", "eighteen","nineteen"};
char* tens[] = {"twenty", "thirty", "forty", "fifty", "sixty",
"seventy", "eighty", "ninety"};
printf("Enter an integer between 0 and 999: ");
scanf("%s",s1);
printf("This number in English is &s",s1);
}
Hey guys, I am learning how to program with C for the first time. I need to write a program that uses string processing and will convert input numbers to English phrases.
Example:
Enter an integer between 0 and 999: 375
This number in English is three hundred seventy five
I have an idea with this program. I get an input, store it in s1.
strlen to check how long s1 is and then that would let me know if
its in the hundreds,tens, or ones. I don't know how to tackle this program
any further. Can I have some help?