The do while loop is very similar to while loop. In the while loop first check final condition then execute
the statement. But in the do while loop first execute the statement then check
the final condition.
Syntax:
Initialization;
Do{
increment/decrement;
Final condition: Briefly explained in previous lecture.
Initialization: in this part of the for loop can declared the starting point of for loop. That’s means initial point of statement execution .in the program the red block are indicate initialization.
Final condition: the end point of program. The ending period statement execution , that defined by the final condition. In the program the green block are indicate the final condition.
Comments
Post a Comment