Answer:

1000.0. The variable starts out at 0.0, and has 0.1 added to it until it reaches 999.9. The while allows one more iteration, so 0.1 is added to make 1000.0. The loop now exits.

But if you try this the variable actually ends up as 1000.0000000001588.

End of the Chapter

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

You have reached the end of the chapter.

go to previous page   go to home page