# Integer to String

• 09-12-2008, 11:45 AM
zervine
Integer to String

the program output is Banking:

Please Enter any amount: 15302
Monetary breakdown
1000= 15
500= 0
200= 1
100= 1
50= 0
20= 0
10= 0
5= 0
1= 2

I need to convert the input amount into words...
I already did the breakdown, i just need to conver it to words..
Can anyone help me on this problem..? Need to finish this program badly..
:( :(
• 09-12-2008, 12:06 PM
Eranga
Seems you have to build a well formed algorithm for this. As a hint, start from the last digit, I mean the right most digit. Read the value and check there is another digit in the left hand side.
• 09-12-2008, 12:16 PM
zervine
Actually, we are using readline for this.
And he said that we must use a swtich statement, but he said that we must first do a formula how the execution goes on converting the int to chararcter.
The maximum input was 1million only.
Can you give me formula o how do i convert it to words, i already use the case statement, but it will took so long before i made it.We also use a readstring in this program.
• 09-12-2008, 01:07 PM
Eranga
Can you show your code.