हिंदी

Explain with a flowchart the following control structure: Iteration Logic

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)
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×