Advertisement Remove all ads

Explain with flowchart the following control structure : Iteration Logic - Computer Science 1

Explain with flowchart the following control structure : Iteration Logic

Advertisement Remove all ads

Solution

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.

Concept: Basic Data Structures (Stack, Queue, Dequeue)
  Is there an error in this question or solution?
Advertisement Remove all ads

APPEARS IN

Advertisement Remove all ads
Advertisement Remove all ads
Share
Notifications

View all notifications


      Forgot password?
View in app×