what is the while loop ? Describe
Answers
Answered by
4
Answer:
while loop is a loop that continues a set of instruction until a given condition is not matched.
Explanation:
Answered by
66
Question:
What is the while loop? Describe.
Answer:
A while loop says to execute the following set of instructions in a loop while a condition is true. Let's take a simple example of a mouse who wants to eat some food.
While (you are hungry)
{
Find some food;
Eat the food;
}
The set of instructions following the while statement will be repeated while the mouse is still hungry. The amount of food the mouse finds each time could range from a tiny crumb to an entire loaf of bread. Similarly, the number of times the set of instructions in the while statement is executed changes depending on how much food the mouse finds.
I hope it helps you.........☺️
Anonymous:
Perfect !
Similar questions
Math,
2 months ago
Political Science,
2 months ago
Physics,
4 months ago
Social Sciences,
4 months ago
CBSE BOARD X,
10 months ago
Math,
10 months ago