Advertisements
Advertisements
प्रश्न
Explain with a flowchart the following control structure:
Iteration Logic
स्पष्ट करा
Advertisements
उत्तर
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 a 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 an initialisation statement, and there must be a statement that will change the index variable in the loop.
shaalaa.com
Basic Data Structures (Stack, Queue, Dequeue)
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
