Create an account
to _________ a value means to increase it, and to decrement a value means to decrease it. Three different ways to write: ( num = num+1, num += 1, num++ )
the ______ loop has two important parts: 1) an expression that is tested for a true or false value, and 2) a statement or block that is repeated as long as the expression is true.
the first line of a loop, sometimes called the ____ _____, consists of the key word (while) follwed by a (condition) to be tested enclosed in parentheses.
the _______ of a (while) loop is expressed by any expression that can be evaluated as true or false.
This contains or more C++ statements. The condition expression is tested, and if it is true, each statement in the body of the loop is executed. Then, the condition is tested again. If it is still true, each statement is executed again. This cycle repeats until the condition is false. As with an (if) statement, each statement in the _____ of the loop is to be conditionally executed ends with a semicolon.
loop control variable
a variable that controls the number of time a loop iterates is referred to as a ____ _______ _______.
the (while) loop is known as a ______ loop, which means it tests its expression before each iteration.
the process of inspecting data given to a program by the user an determining if it is valid. The while loop is especially useful for _____ _________.
a _______ is a variable that is regularly incrememted or decremented each time a loop iterates.
the __-_____ ____ is a post test loop. it looks similar to a while loop turned upside down. A good choice for repeating a menu.
the ____ ____ is a pretest loop that combines the initialization, testing, and updating of a loop control varialbe in a single loop header. A type of loop specifically for count-controlled loops.
_____-_________ ____ is a loop that repeats a specific number of times. it must possess three elements:
1) IT must initialize a counter variable to a starting value.
2) It must test the counter variable by comparing it to a final value. When the counter variable reaches its final value, the loop terminates.
3) It must update the counter variable during each iteration. This is usually done by incrementing the variable.
a _______ _____ is a sum of numbers that accumulates with each iteration of a loop. The variable used to keep the _______ ____ is called an accumulator.
end of file
the ___ __ _____ function of the fstream class signals the end of file and is used to terminate a loop used to read data from a file.
Please allow access to your computer’s microphone to use Voice Recording.
Having trouble? Click here for help.
We can’t access your microphone!
Click the icon above to update your browser permissions and try again
Reload the page to try again!Reload
Press Cmd-0 to reset your zoom
Press Ctrl-0 to reset your zoom
It looks like your browser might be zoomed in or out. Your browser needs to be zoomed to a normal size to record audio.
Please upgrade Flash or install Chrome
to use Voice Recording.
For more help, see our troubleshooting page.
Your microphone is muted
For help fixing this issue, see this FAQ.
Star this term
You can study starred terms together