Counter controlled loops are where we know the number of loop executions beforehand. Unlike counter controlled loops, in sentinel controlled loops the number of loop executions in unknow at the beginning and depends on decisions made inside the loop.
loop
What are the counter and sentinel controlled loops?
Based on the nature of the control variable and the condition or limit, the loops can be of two general categories; counter controlled and sentinel controlled loops. Counter controlled loops are where we know the number of loop executions beforehand. Unlike counter controlled loops, in sentinel controlled loops the number of loop executions in unknow at the beginning and depends on decisions made inside the loop.