Computer Science, asked by alok783, 1 year ago

what is loop? What is the need of it?

Answers

Answered by gunjan010773p2afz3
1
In computer programming, a loop is a sequence of instruction s that is continually repeated until a certaincondition is reached. Typically, a certain process is done, such as getting an item of data and changing it, and then somecondition is checked such as whether a counter has reached a prescribed number.
Answered by Anonymous
2

WHAT IS A LOOP ?


⇒ A loop is a part of a program that iterates a value and repeats the iteration if a particular condition is satisfied .

⇒ A loop is the sequence of repeatation of functions or tasks

⇒ You can also say that loop is a sequence or repeatation of instructions


NEED OF A LOOP


⇒ A loop makes our task easier

⇒ Imagine that you are taking an input of 1,000 elements . You can write the statement in 3 lines with a loop but if you would not have used then you had to use 1,000 lines for doing the same task.

⇒ A loop satisfies certain conditions and gives us the desired output .

⇒ A loop helps in handling an array

⇒ A loop performs useful mathematical operations


Hope it helps :-)

____________________________________________________________________

Similar questions