Hi all,

I am required to write a program in an exercise of a book to transliterate a number into English. I can do it into five languages (Arabic, Persian, Urdu, English, Punjabi) but when it comes to writing a program, its tedious. I can't make out the strategy. For being a programmer, you need to write the strategy (what variables, functions, you'll be having) and that alone is a difficult task.

I thought I should convert it into a float (like a base in standard notation in maths). Like 9 38 to be 9.38 (leave x 10^2). Then using an char array storing the digit names, get 0 to be zero. The sequence would be to convert the float into int (temporarily (so only the first digit remains)). Then subtract 9 (1st digit) and multiply by ten. Do the same with 3 (that now stands at position 3.8). Do this until number % 10 != 0. But how will float store large values?

...............

unsigned float (is it any kind)?

I am required to write a program in an exercise of a book to transliterate a number into English. I can do it into five languages (Arabic, Persian, Urdu, English, Punjabi) but when it comes to writing a program, its tedious. I can't make out the strategy. For being a programmer, you need to write the strategy (what variables, functions, you'll be having) and that alone is a difficult task.

I thought I should convert it into a float (like a base in standard notation in maths). Like 9 38 to be 9.38 (leave x 10^2). Then using an char array storing the digit names, get 0 to be zero. The sequence would be to convert the float into int (temporarily (so only the first digit remains)). Then subtract 9 (1st digit) and multiply by ten. Do the same with 3 (that now stands at position 3.8). Do this until number % 10 != 0. But how will float store large values?

...............

unsigned float (is it any kind)?