i need help and it's really urgent

Page 2 - Seeking answers? Join the Tom's Guide community: where nearly two million members share solutions and discuss the latest tech.

Aravind Vijayan

Jul 13, 2014
convert a positive integer code into its english name equivalent for digit. A valid code is of size between four (4) to six (6) digits inclusive. A zero is not allowed in the code.
example : if the input is 234056 the output is : INVALID CODE (PRESENCE OF ZERO)
if the input is 23456 the output is : TWO THREE FOUR FIVE SIX
if the input is 9349 the output is : NINE THREE FOUR NINE
if the input is 245 the output is : INVALID CODE (3 DIGITS)
if the input is 2344567 the output is : INVALID CODE (7 DIGITS)

step 1 : input code
step 2 : count the number of digits in the code
step 3 : if there is a zero in the code, "INVALID CODE (PRESENCE OF ZERO)" go to step 4
step 4 : if number of digits is mode or equal than 4 and less or equal than 6, go to step 5 else display the following message "INVALID CODE (<number of digits> DIGITS)
step 5 : call a function called digit_name to convert each digit into its
equivalent english name. display the result
step 6 : print the digits in reverse order
eg; if input is 13453, reverse order is 35431



because it said urgent :p , and it remind me of my first basic programming class.


Nov 23, 2008

I'm considering to learn C++ myself, my dad needs a programmer for small jobs in his company, but asking questions about homework kinda pisses me off(I help people with math). Asking about the theory how it is used instead, then incorporating it into your work is more respectable.

If he wants help with programming he should go to a forums like:
Programmers Heaven

Those are only the ones I know on the top of my head, but there are so many. If he asks about specific code and expect an exact solution to his homework there, he might just get banned.