Programs for floating point numbers to text.

topsquark

Math Team
May 2013
2,533
1,052
The Astral plane
Yes.

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

-Dan
 
Aug 2012
2,496
781
Reference :

https://www.google.com/amp/s/www.geeksforgeeks.org/convert-number-to-words/amp/

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.
 
Nov 2018
32
1
Mumbai
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
Dec 2006
21,482
2,472
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?
 
Nov 2018
32
1
Mumbai
Programs for floating point to Words.

Thanks.

I agree.

Thanks & Regards,
Prashant S Akerkar
 
Last edited: