Write a program that takes an integer keyed in from the terminal and extracts and
displays each digit of the integer in English. So, if the user types in 932, the program
nine three two
Remember to display “zero” if the user types in just a 0.
We don't do homework really. But how is your attempt working so far and what's going wrong?
Yeah sounds like homework to me.
Some things you should look at:
First you should convert the int to a string (char). Use itoa.
Then create an array of 10 items that contains the English word for each number. Good idea would be to match the word to the index of the array. then loop through the number string using each character as the array index. (would have to convert back to int) and concatenate the words together adding a space after each word.
by Naveed Ahmed3 years ago
How do we know to use a particular header file in C programming?I am new to C Programming and I have observed that we can perform similar tasks while using either of the header files "iostream.h" and...
by akumarcom6 years ago
What tools are require to learn C programming language?I want to learn C language so that I need the required tools. Please also post the tool links.
by rita gailor8 years ago
what are the advantage and disadvantages of c programming language
Copyright © 2018 HubPages Inc. and respective owners.
Other product and company names shown may be trademarks of their respective owners.
HubPages® is a registered Service Mark of HubPages, Inc.
HubPages and Hubbers (authors) may earn revenue on this page based on affiliate relationships and advertisements with partners including Amazon, Google, and others.