Four basic elements of the counter-controlled repetition are; control variable which is also referred as a loop counter, initial value which is the starting point of control variable, an increment (or decrement) which modified the control variable each time through the loop, and loop-continuation condition which determines whether the loop is continue or not.
2. Compare and contrast the while and for repetition statements (2 points).
The while statement identify the elements of sentinel-controlled-repetition. In the other hand, for repetition statements used to identify the elements of counter-controlled-repetition. However, this both statements execute the