Click here to Skip to main content
15,894,176 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
How to code function to read amounts(USD) in english. Anyone help me. thank a lot.
Example: 12,554.82 USD
In Words: Twelve thousand five hundred fifty four dollars eighty two cents
Posted
Updated 21-Oct-14 6:30am
v2
Comments
CHill60 21-Oct-14 12:22pm    
Not clear. What have you tried? Where are you stuck?
Truong Minh Tam 21-Oct-14 12:31pm    
Example: 12,554.82 USD
In Words: Twelve thousand five hundred fifty four dollars eighty two cents
Sergey Alexandrovich Kryukov 21-Oct-14 12:27pm    
Not clear. If you want to parse strings like "three hundreds fifty nine dollars" into numeric values, I would wonder: why?
—SA
Truong Minh Tam 21-Oct-14 12:33pm    
Example: 12,554.82 USD
In Words: Twelve thousand five hundred fifty four dollars eighty two cents
Sergey Alexandrovich Kryukov 21-Oct-14 12:35pm    
Now, why? Do anyone in sober state mind really enters those words?
I'm serious, I really want to know how such strings appear.
—SA

There are several suggestions to be found via Google

e.g. http://www.c-sharpcorner.com/UploadFile/b942f9/converting-numbers-to-words-in-C-Sharp/[^]

lots more[^]
 
Share this answer
 
Comments
Truong Minh Tam 21-Oct-14 12:49pm    
thank a lot.
Sergey Alexandrovich Kryukov 21-Oct-14 12:51pm    
OP never answered my question. I'm not sure it's about converting numeric to string; I understood it as parsing string to numeric, which sounds weird to me...
—SA
Truong Minh Tam 21-Oct-14 12:54pm    
and thank your support.
Sergey Alexandrovich Kryukov 21-Oct-14 12:56pm    
You still did not answer my questions...
—SA
Truong Minh Tam 21-Oct-14 12:59pm    
I want convert number to word. Number is $ currency. It is ok.
Conver number into word[^]

how to convert number into words in C#[^]

It seems this is a perennial first year class assignment. And then all the students are so proud of their creations that they post them here.

Similarly, please consider that teachers know about this site and will know if you simply copied (plagiarized) any of these implementations.
Furthermore, none of these implementations is perfect (including Solution 2), but you can read each and use the concepts you like to form a solution that is truly your own.


We have so many we even have a spoof: Converting numbers to the word equivalent. [^]

How to Convert Numeric Value to Text(String)[^]

Convert Currency To Words in Lakh, Crores, etc.[^]

Convert Amount in Words and Separate Amount with comma in Bangladeshi Currency Format using C#.NET[^]

XSLT Number to String Transformation II[^]

Convert Numeric Currency into Words for International Currency - Part - II (Optimized)[^]


Converting numbers into English[^]

How to Convert a Numeric Value or Currency to English Words Using C#[^]

Convert Number to Text[^]

Number To Word (Arabic Version)[^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 21-Oct-14 14:43pm    
5ed.
—SA
BillWoodruff 21-Oct-14 15:43pm    
+5 for scholarship leading to migraine headache :)
PIEBALDconsult 21-Oct-14 16:03pm    
I keep them handy for just such occasions.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900