how to make repeated decimal become "..." | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

how to make repeated decimal become "..."

input = 0.998998998998 output = 0.998...

12th Oct 2018, 3:37 AM
Yoaraci
Yoaraci - avatar
1 Answer
0
check the numbers after the dot, if a pattern occurs, thats where you print out ... instead. i can make the code iyw
12th Oct 2018, 11:56 PM
Kuyondo
Kuyondo - avatar