If you enter a limit of 1000.0, what would be printed out if the arithmetic were perfectly accurate?

A good answer might be:

1000.0. The variable starts out at 0.0, and would have 0.1 added to it until it became 999.9. This last value would pass the while's condition, and would have 0.1 added to it to become 1000.0, which would not be < limit.

End of the Chapter

I hope you were not counting on more lessons, because this is the end of the chapter. You may wish to review the following.

Click on a blue subject that interests you to go to where it was discussed. To get back here, click on the "back arrow" button of your browser.


Click here to go back to the main menu.
You have reached the End.