which elements are needed to control a loop?
Please give answer in ur own words
Answers
Answered by
7
To control a loop,
you need to have a defined loop type and it's test condition should be typed with defining the loop type.
Then you need to have the body of the loop where you define the statements for your loop to perform.
Some examples of loops in c++ are for loop, do while loop, while loop ,etc.
you need to have a defined loop type and it's test condition should be typed with defining the loop type.
Then you need to have the body of the loop where you define the statements for your loop to perform.
Some examples of loops in c++ are for loop, do while loop, while loop ,etc.
tiwarichanda985:
hey I m confused which to mark as brainliest
Answered by
11
Hello user !
Your question: How to control a loop ?
Answer :
1) There are two types of loop - exit controlled and entry controlled.
2) In a loop , you need initialization, condition and updation
3) The body of the program should be according to the syntax of the loop
4) In entry controlled loop , there are - for loop whose syntax is given below..
for (int variable; Condition; updation)
{
body of the loop i.ewhat do you need from the program
}
So , for this you must have appropriate condition and updation according to your requirement . In this way , you can control a loop.
Hope it helps ❤❤
Similar questions