# Programs for floating point numbers to text.

#### topsquark

Math Team
Yes.

Please let us know what you have tried and we'll give you a hand where you need it.

-Dan

#### Maschke

Reference :

Can we write computer programs which will
convert a floating point or decimal number in words?

Programming languages could be C,C++,Java,C#, Python etc.

Example :

Input

375.50

Output

Three hundred seventy five and fifty only.

Thanks & Regards,
Prashant S Akerkar
Yes, that would be a nice exercise for late in the semester of a beginning programming class. You should take a shot at it, it's a fun challenge.

What's more interesting is that you CAN'T write a computer program to tell you whether a floating point number is zero. That problem is noncomputable. Many rounding errors lurk therein; and chaos theory tells us that rounding errors matter.

#### skipjack

Forum Staff
convert a floating point or decimal number in words?
What did you mean by "floating point number"? Did you mean "into words" rather than "in words"?

#### akerkarprash

Thanks.

Examples of floating point or decimal numbers :

2.3,43.11,567.50,89.23 etc

Thanks & Regards,
Prashant S Akerkar

#### skipjack

Forum Staff
Can you define "floating point number" precisely (without giving examples), rather than give examples that might instead be decimals? Also, can you answer regarding the wording you used?

#### weirddave

375.50

Output

Three hundred seventy five and fifty only.
That's incorrect, the output should be:

Three hundred (and) seventy five point five zero

#### akerkarprash

Programs for floating point to Words.

Thanks.

I agree.

Thanks & Regards,
Prashant S Akerkar

Last edited: