can anyone help me in figuring out how to convert numbers into words with the use of loops and arrays. The numbers should calculate up to millions.
Here's an example: if user types 9246 , It should print Nine Thousand Two Hundred Forty Six .
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Sep 12, 2014, 12:18 AM
Hi,
There is no built in function that convert number to word...
so you must Preserve value like 1= one 2= two so on....
to Preserve this Below link he/she use Array...
http://www.c-sharpcorner.com/UploadFile/b942f9/converting-numbers-to-words-in-C-Sharp/
In anyway you have to use NumberToText function :)
hope this will help you.
Ramesh MaruthiPosted Sep 11, 2014, 9:57 AM
Use the Humanizer .. Please look at the below link
http://www.hanselman.com/blog/NuGetPackageOfTheWeekHumanizerMakesNETDataTypesMoreHuman.aspx
Arunava BhattacharjeePosted Sep 11, 2014, 8:11 AM
Xavier HenryPosted Sep 11, 2014, 7:43 AM
Anoop Kumar SharmaPosted Sep 11, 2014, 7:36 AM
http://www.c-sharpcorner.com/UploadFile/b942f9/converting-numbers-to-words-in-C-Sharp/
Hope this will help you.