
Jumping into C++

Just a moment...
anthropic.com
Whenever you write a loop, you should think about an appropriate decrementing function. This is a function that has the following properties: It maps a set of program variables into an integer. When the loop is entered, its value is nonnegative. When its value is ≤ 0, the loop terminates. Its value is decreased every time through the loop.
John Guttag • Introduction to Computation and Programming Using Python, second edition: With Application to Understanding Data

