Note 8.7.1. Modify the program ….
If the sum never reaches 2.0, the loop would never terminate. But the loop does stop! How many repetitions did it make before it stopped?
On line 9 (not indented), print the value of
aNumber
and you will see.But why did it reach 2.0? Are those math teachers wrong?