A while loop repeat to execute target statement as long
as the given condition is true.
Syntax:
Initialization ;
While(Final condition){
Increment/decrements; }
Initialization: Read the previous lecture.
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.
Increment/decrements:
The increment operators are use to increases the values of its operand and
decrements operators are use to increases the values of its operand. in the
program yellow box are indicate increment.
Click for see flow chart on while loop
Comments
Post a Comment