1. Looping Statement &
Flow Chart
Guided by-
All Teachers
Presented by –
Rahul Sahu
B.Sc.- IIIrd Year (CS)
2. Looping Statement:-
The Statement which is use to repeat the single or block
of statement up to given condition is known as looping
statement.
Type of looping statement:- looping statement is
divided in two parts-
i. Entry control loop
ii. Exit control loop
3. Entry Control Loop:-
The looping statement which check the condition first
and than execute block of statement is known as Entry
control loop.
It is known as Entry control loop because it check
condition in Entry level of loop. If condition is true the
body of loop is executed and if condition is false the
body of loop is not executed.
Ex:- for and while.
4. Exit Control Loop:-
This looping statement is executed body of loop first (at
least one time) and than condition is checked because
the condition is checked at the time of exit this looping
statement is known as Exit control loop.
Ex:- do while .
5. While loop:-
The simplest entry control loop which can first check
condition than execute body of loop if condition is true.
Syntax:-
while(condition)
{
-----------------
body of loop;
-----------------
increment / decrement operator of a counter
variable;
}
7. For loop:-
For is composite control loop in which all the looping
part is written single line.
Syntax:-
for(initialization ; condition; increment)
{
-------------------
body of loop;
-------------------
}
9. Do While Loop:-
do while is exit control loop in which body of loop
executed first ( at least one time) by do statement and
than condition is checked by while statement. If
condition is true the process is repeated otherwise next
part of program is executed.
Syntax:-
do
{
-----------------
Block of statement;
------------------
}while(condition);
10. goto statement:-
It is a jumping statement use to jump the control of
program from one part to another specific part.
Syntax:-
goto label;
Types of goto statement:-
1. Forward jump (label declare to below of goto )
2. Backward jump (label declare to above of goto)
11. Flow Chart:-
A flow chart is essentially a diagram or picture which
defines the procedure how to solve the problem. A flow
chart show the order of operations. It also show the
relationship between the sections of the program. Flow
chart are independent of a particular computer or
computer language.
12. Some Basic Symbol For
Flow Chart:-
Start / End In page break
Input / Output Off page break
Processing
Decision
Flow of Process