Click here to Skip to main content
15,886,579 members
Articles / Web Development / ASP.NET

how to print string, if i input "1" then print "One", if i input "15" then print "fifteen", if i input "123" then print "one hundred and twenty-three "

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
15 Nov 2012CPOL 0  
http://stackoverflow.com/questions/2729752/converting-numbers-in-to-words-c-sharp[^]http://social.msdn.microsoft.com/Forums/nb-NO/csharpgeneral/thread/0b1dec9c-61e9-4544-8134-bda1264a21a4[^]http://www.c-sharpcorner.com/UploadFile/b942f9/converting-numbers-to-words-in-C-Sharp/[^]

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
15 Nov 2012David Goebet
If you want to "show" it in a Console so just use:string Number = Console.readLine();and then some if-questions like:if(Number.Equals("1")){Console.WriteLine("one")}if(Number.Equals("123")){Console.WriteLine("onehundreed and twenty-three")}or with a switch case...
Please Sign up or sign in to vote.
15 Nov 2012Yani Mulki Wahid 3 alternatives  
how to print string, if i input "1" then print "One", if i input "15" then print "fifteen", if i input "123" then print "one hundred and twenty-three "
Please Sign up or sign in to vote.
15 Nov 2012OriginalGriff
Now we are getting into doing your whole home work!See here: Converting numbers to the word equivalent. [^]

License

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


Written By
Founder WizadApps
Bangladesh Bangladesh
Dreams to change the world and use creative tech solutions for mankind.
Completed BSC on Computer Science and Engineering from Khulna University in December, 2013. Leading own startup named WizadApps which works on future generation technologies. Besides acting as Lead Regional Android Course Training Co-ordinator of GDG Dhaka. Has interest on pattern recognition, embedded system, robotics and AI. As a Tech enthusiast always like to do code, develop creative things, brainstorming innovations, help people about programming and inspire them with new ideas to build.

Comments and Discussions