what is loop?how we can use it and what are the three loops we study in in this topic.
Answers
Answered by
1
Inorder to repeat single or set of instructions in the program,we use loops.
Three loops are while,do-while and for loop
Three loops are while,do-while and for loop
Answered by
1
Loops: Loops are created for repeating certain statements for certain amount of time with certain conditions. Looping makes our tasks easy since it reduces the number of lines of codes.
Three types of important loops in most programming languages are for loop, while loop and do while loop.
For loop has the initial counter value, a condition to be tested and the value will be incremented or decremented according the need of the program.
while loop is similar to for loop where it splits all the three parts of for loop.
do while gets “executed at least once” though the condition is true or false.
Similar questions