Write the syntax of a while loop.
Answers
Answered by
5
HEY DEAR*-------*
YOUR ANSWER IS:----
For Loop syntax
For loop stars with "for" keyword and three parameters enclosed within a
first bracket. Three parameters are -:-
1.Initialization statements
2.Condition of the looping
3.Repeat steps
Loop statements are enclosed with a second bracket. This bracket in not needed if there is only one statement.
While Loop syntax
While loop stars with "while" keyword and is one condition for the loop which is enclosed within a first bracket. Loop statements are enclosed with a second bracket. This bracket in not needed if there is only one statement.
.
.
.
Mark me as Brainliest ♡➷
Attachments:
Answered by
2
The syntax of while loop in C programming language is:
while (condition)
{
statements ;
}
- While loop is a straightforward looping structure and can also be defined as an entry-controlled loop.
- When while loop is used in the program, the given condition is firstly evaluated and after that processing of the body of the loop is performed.
- If the given condition is true, only then the body of a loop is executed otherwise not.
Similar questions
Computer Science,
5 months ago
Physics,
5 months ago
Math,
5 months ago
Computer Science,
11 months ago
Computer Science,
11 months ago