What’s wrong with the following while iteration statement?
```
while (z >= 0) {
sum += z;
}
```
The value of the variable z is never changed in the while statement. Therefore, if the loop-continuation condition (z >= 0) is initially true, an infinite loop is created. To prevent the infinite loop, z must be decremented so that it eventually becomes less than 0.
You might also like to view...
________ is a Word feature that corrects commonly misspelled words automatically
Fill in the blank(s) with correct word
The financial, mathematical, and text functions that are provided by Excel are called ________ functions
Fill in the blank(s) with the appropriate word(s).
The primary purpose of a client computer is to deliver HTML documents and related resources (like images) in response to client computer requests
Indicate whether the statement is true or false.
What entity created the Interim Standards used in mobile communications?
a. Telecommunications Industry Association b. Global System Communications Industry c. International Telecommunications Union d. Global Telecommunications Association