Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
6.3k views
in Flow of Control by (49.1k points)
closed by

What is entry control loop? Explain any one of the entry control loop with suitable example.

1 Answer

+1 vote
by (54.8k points)
selected by
 
Best answer

An entry control loop checks the condition at the time of entry and if condition or expression becomes true then control transfers into the body of the loop, for loop and while loop are the examples of Entry Controlled Loop. A while loop is a control flow statement that allows the loop statements to be executed as long as the condition is true.

Type:

Entry control loop

Syntax:

Control flow:

Step 1 : Test – expression is evaluated to either True or False;

Step 2 : If test – expression is true;

(a) The body of the loop is executed.

(b) Control is transferred to step 1.

Step 3: If test – expression is false, the control exits the while loop.

Example:

int a = 1;

while (a<=10)

{

cout << a << ‘\t+’;

a+=2;

}

Output:

1 3 5 7 9

Related questions

0 votes
1 answer
0 votes
1 answer
+1 vote
1 answer
0 votes
1 answer
0 votes
1 answer

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

...