Advertisements
Advertisements
प्रश्न
Explain with flowchart the following control structure : Iteration Logic
उत्तर
Interation Logic:
The repeat for loop has the following form,
Form:
Repeat for K = R to S by T [Module] [End of loop] |
where K = Index variable
R = Initial value of K
S = Final value of K
T = Step (increment/decrement)
The loop is executed for all values of K starting from R to S with step of T.
It uses a condition to control the loop.
Form:
Repeat while condition: [Module] [End of loop] |
The loop continues till a condition is true. There must be initialization statement and there must be a statement that will change index variable in loop.
shaalaa.com
Basic Data Structures (Stack, Queue, Dequeue)
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?