a small c problem

Status
Not open for further replies.

tuxfan

Technomancer
shirish_nagar said:
I think he should first check the number of Digits in given input.

ex. 10,286. Here it is 5. Hence the output string must contain "Thousand".

Then it is easy to write the code. Bcoz TEN is same for Lacks, Hundreds & TEN also.

Isn't it?

I think he will be better off converting the string to numbers first! So that if someone plays a mischief by entering say a string like "A5463" then the program doesn't process it at all.

Secondly, here're 2 hints!

Use the mod operator % ;)
Use arrays with the strings "twenty" "thirty", etc.
Use some more arrays and variable of course. I guess these hints are enough ;)
 
Status
Not open for further replies.
Top Bottom