Click here to Skip to main content
15,881,709 members
Articles / Programming Languages / C++
Article

Number To Text Converter

Rate me:
Please Sign up or sign in to vote.
2.89/5 (28 votes)
27 Jan 20031 min read 109.3K   2.2K   17   22
Convert a given number (range from one to hundred of vigintillion(10^63) ) to the text that people use to pronouce the number

Image 1

Introduction

This program is  a Number to Text converter. which can convert a given number (range from one to hundred of vigintillion(10^63) ) to the text that people use to pronouce the number.

Feel free to use this code and please give feedback to me. Right now it works for AMERICAN ENGLISH.

This code is copyrighted and has limited warranties.

Terms of Agreement

By using this code, you agree to the following terms.

  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge, BUT you have to show that you used this code in your 'About' or 'Help'. I also request you to mail me on above email address with subject 'Used NumberToText' so I can able to know where this script used.
  2. You MAY redistribute this code (for example to a web site) without written permission from the original author. BUT you have to clearly indicate the origin of this code by giving the link to this code from where you download.
  3. You MAY link to this code from another website.
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
QuestionI'm new at IT(newbie) Pin
Member 1206245015-Oct-15 17:19
Member 1206245015-Oct-15 17:19 
GeneralMy vote of 5 Pin
roopnirban14-Feb-13 2:45
roopnirban14-Feb-13 2:45 
GeneralMy vote of 5 Pin
Sayyed Mostafa Hashemi21-Dec-10 3:29
Sayyed Mostafa Hashemi21-Dec-10 3:29 
Generalnumeric value or text value Pin
jaillani khan10-May-09 8:26
jaillani khan10-May-09 8:26 
Questioncan i use this programe in excel? Pin
Steveko7713-May-05 21:35
Steveko7713-May-05 21:35 
AnswerRe: can i use this programe in excel? Pin
rithesh.b23-Jun-06 1:50
rithesh.b23-Jun-06 1:50 
GeneralAbout This Article Pin
| Muhammad Waqas Butt |29-Dec-04 21:32
professional| Muhammad Waqas Butt |29-Dec-04 21:32 
General00 returns ten Pin
caleb.anderson25-Aug-03 7:28
caleb.anderson25-Aug-03 7:28 
GeneralRe: 00 returns ten Pin
joxo1-Mar-06 2:37
joxo1-Mar-06 2:37 
GeneralHmmm.... Overpriced terms, I suppose Pin
Roman Fadeyev4-Feb-03 19:05
Roman Fadeyev4-Feb-03 19:05 
GeneralA Billion is not a Billion, except in the states Pin
Patje28-Jan-03 2:59
Patje28-Jan-03 2:59 
GeneralRe: A Billion is not a Billion, except in the states Pin
Ed Gadziemski28-Jan-03 10:33
professionalEd Gadziemski28-Jan-03 10:33 
GeneralRe: A Billion is not a Billion, except in the states Pin
Patje28-Jan-03 21:13
Patje28-Jan-03 21:13 
GeneralRe: A Billion is not a Billion, except in the states Pin
pinakvashi28-Jan-03 18:13
pinakvashi28-Jan-03 18:13 
GeneralMissing ANDs and commas Pin
Craig Henderson28-Jan-03 2:48
Craig Henderson28-Jan-03 2:48 
GeneralRe: Missing ANDs and commas Pin
Anonymous28-Jan-03 3:52
Anonymous28-Jan-03 3:52 
GeneralRe: Missing ANDs and commas Pin
benjymous28-Jan-03 5:06
benjymous28-Jan-03 5:06 
GeneralRe: Missing ANDs and commas Pin
Craig Henderson28-Jan-03 21:17
Craig Henderson28-Jan-03 21:17 
GeneralRe: Missing ANDs and commas Pin
Koizumi109224-Nov-08 10:04
Koizumi109224-Nov-08 10:04 
The "and" and commas are personal preference. You could just easily alter the code to concat if you wanted it to. Their absence doesn't really affect actual performance at all, it's just a cosmetic difference in preferences.

Although I do agree that if you included floating point numbers, you would definitely need the "and" in there since it makes it easier for the human mind to switch gears.
GeneralTypo! Pin
Martyn Pearson27-Jan-03 23:11
Martyn Pearson27-Jan-03 23:11 
GeneralRe: Typo! Pin
pinakvashi28-Jan-03 18:11
pinakvashi28-Jan-03 18:11 
Generalhi Pin
parisraj5-Dec-08 16:18
parisraj5-Dec-08 16:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.