script to convert numbers in to string
Hi,
Is there any script that would help me with conversion of number (digits) in to string (amount to be paid) in like in INR e.g. 123456789.56 Twelve crore thirty four lacs fifty six thousand seven hundred and eighty nine rupees and fifty six paise Thanks. |
What have you tried? What programming language are you considering?
|
sounds like how they used to count money in britain in the old days.
it's not that long ago, maybe you can find a conversion script and adapt it. |
http://www.zyxware.com/articles/3516...mbering-system
https://stackoverflow.com/questions/...th-paise-value https://stackoverflow.com/questions/...l-value-in-php https://stackoverflow.com/questions/...-format-in-php https://www.computing.net/answers/of...pes/11726.html From this web-search: convert number to inr crore lakhs "linux" |
This can be easily done. But a script might not be the best way because the easiest way is to use division. The easiest method of doing this is to use some program in C or a small python routine.
e.g. algorithm Code:
loop UNIT through {crore, lakh, 10000, 1000, 100, ...} |
That sounds like a standard HOMEWORK question from a programming course, that has been asked and answered MANY times before.
|
Argh... is that pseudocode?
Eh... script in which language? This is doable in Bash, but as aragorn2101 has noted, easier in a language with solid math capabilities. |
Till 19 they are unique; then they follow a regular pattern.
|
All times are GMT -5. The time now is 02:19 PM. |