SlideShare a Scribd company logo
1 of 14
Looping Statement &
Flow Chart
Guided by-
All Teachers
Presented by –
Rahul Sahu
B.Sc.- IIIrd Year (CS)
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
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.
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 .
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;
}
Example:-
#include<stdio.h>
void main()
{
int a,b,c;
printf(“n Enter the no. to print table”); Output:-
scanf(“%d”,&a);
b=1;
while(b<=10)
{
c=a*b;
printf(“n %d x %d = %d”,a,b,c);
b++;
}
getch();
}
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;
-------------------
}
Example:-
#include<stdio.h>
void main()
{
int a,b,c;
printf(“n Enter the no. to print table”); Output:-
scanf(“%d”,&a);
for(b=1;b<=10;b++)
{
c=a*b;
printf(“n %d x %d = %d”,a,b,c);
}
getch();
}
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);
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)
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.
Some Basic Symbol For
Flow Chart:-
Start / End In page break
Input / Output Off page break
Processing
Decision
Flow of Process
Example:-
Print table
False
True
Start
Enter no. a
b=1
Is
b<=10
c= a * b
Print a x b =c
b++
Stop
Thank you

More Related Content

What's hot

Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and FlowchartsDeva Singh
 
Loops in C Programming
Loops in C ProgrammingLoops in C Programming
Loops in C ProgrammingHimanshu Negi
 
C Programming: Control Structure
C Programming: Control StructureC Programming: Control Structure
C Programming: Control StructureSokngim Sa
 
C programs
C programsC programs
C programsMinu S
 
Decision making statements in C programming
Decision making statements in C programmingDecision making statements in C programming
Decision making statements in C programmingRabin BK
 
Chapter 3 : Balagurusamy Programming ANSI in C
Chapter 3 : Balagurusamy Programming ANSI in C Chapter 3 : Balagurusamy Programming ANSI in C
Chapter 3 : Balagurusamy Programming ANSI in C BUBT
 
Java if else condition - powerpoint persentation
Java if else condition - powerpoint persentationJava if else condition - powerpoint persentation
Java if else condition - powerpoint persentationManeesha Caldera
 
10. switch case
10. switch case10. switch case
10. switch caseWay2itech
 
Decision Making Statement in C ppt
Decision Making Statement in C pptDecision Making Statement in C ppt
Decision Making Statement in C pptMANJUTRIPATHI7
 
C lecture 4 nested loops and jumping statements slideshare
C lecture 4 nested loops and jumping statements slideshareC lecture 4 nested loops and jumping statements slideshare
C lecture 4 nested loops and jumping statements slideshareGagan Deep
 
RECURSION IN C
RECURSION IN C RECURSION IN C
RECURSION IN C v_jk
 

What's hot (20)

Break and continue
Break and continueBreak and continue
Break and continue
 
Different loops in C
Different loops in CDifferent loops in C
Different loops in C
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and Flowcharts
 
Loops in C Programming
Loops in C ProgrammingLoops in C Programming
Loops in C Programming
 
Control statements
Control statementsControl statements
Control statements
 
C Programming: Control Structure
C Programming: Control StructureC Programming: Control Structure
C Programming: Control Structure
 
C programs
C programsC programs
C programs
 
Decision making statements in C programming
Decision making statements in C programmingDecision making statements in C programming
Decision making statements in C programming
 
Decision Making and Looping
Decision Making and LoopingDecision Making and Looping
Decision Making and Looping
 
pre processor directives in C
pre processor directives in Cpre processor directives in C
pre processor directives in C
 
Chapter 3 : Balagurusamy Programming ANSI in C
Chapter 3 : Balagurusamy Programming ANSI in C Chapter 3 : Balagurusamy Programming ANSI in C
Chapter 3 : Balagurusamy Programming ANSI in C
 
Python Programming Essentials - M9 - String Formatting
Python Programming Essentials - M9 - String FormattingPython Programming Essentials - M9 - String Formatting
Python Programming Essentials - M9 - String Formatting
 
Looping in C
Looping in CLooping in C
Looping in C
 
Java if else condition - powerpoint persentation
Java if else condition - powerpoint persentationJava if else condition - powerpoint persentation
Java if else condition - powerpoint persentation
 
10. switch case
10. switch case10. switch case
10. switch case
 
Decision Making Statement in C ppt
Decision Making Statement in C pptDecision Making Statement in C ppt
Decision Making Statement in C ppt
 
C lecture 4 nested loops and jumping statements slideshare
C lecture 4 nested loops and jumping statements slideshareC lecture 4 nested loops and jumping statements slideshare
C lecture 4 nested loops and jumping statements slideshare
 
Control statements in c
Control statements in cControl statements in c
Control statements in c
 
RECURSION IN C
RECURSION IN C RECURSION IN C
RECURSION IN C
 
Loops c++
Loops c++Loops c++
Loops c++
 

Similar to Looping Statements and Flow Charts Explained

C Programming - Decision making, Looping
C  Programming - Decision making, LoopingC  Programming - Decision making, Looping
C Programming - Decision making, LoopingMURALIDHAR R
 
Bsc cs pic u-3 handling input output and control statements
Bsc cs  pic u-3 handling input output and control statementsBsc cs  pic u-3 handling input output and control statements
Bsc cs pic u-3 handling input output and control statementsRai University
 
Diploma ii cfpc u-3 handling input output and control statements
Diploma ii  cfpc u-3 handling input output and control statementsDiploma ii  cfpc u-3 handling input output and control statements
Diploma ii cfpc u-3 handling input output and control statementsRai University
 
Btech i pic u-3 handling input output and control statements
Btech i pic u-3 handling input output and control statementsBtech i pic u-3 handling input output and control statements
Btech i pic u-3 handling input output and control statementsRai University
 
handling input output and control statements
 handling input output and control statements handling input output and control statements
handling input output and control statementsRai University
 
Mca i pic u-3 handling input output and control statements
Mca i pic u-3 handling input output and control statementsMca i pic u-3 handling input output and control statements
Mca i pic u-3 handling input output and control statementsRai University
 
Unit II chapter 4 Loops in C
Unit II chapter 4 Loops in CUnit II chapter 4 Loops in C
Unit II chapter 4 Loops in CSowmya Jyothi
 
Control Statement IN C.pptx
Control Statement IN C.pptxControl Statement IN C.pptx
Control Statement IN C.pptxsujatha629799
 
loops and iteration.docx
loops and iteration.docxloops and iteration.docx
loops and iteration.docxJavvajiVenkat
 
Programming Fundamentals lecture 8
Programming Fundamentals lecture 8Programming Fundamentals lecture 8
Programming Fundamentals lecture 8REHAN IJAZ
 
Chapter 9 - Loops in C++
Chapter 9 - Loops in C++Chapter 9 - Loops in C++
Chapter 9 - Loops in C++Deepak Singh
 
Loop(for, while, do while) condition Presentation
Loop(for, while, do while) condition PresentationLoop(for, while, do while) condition Presentation
Loop(for, while, do while) condition PresentationBadrul Alam
 
Types of loops in c language
Types of loops in c languageTypes of loops in c language
Types of loops in c languagesneha2494
 

Similar to Looping Statements and Flow Charts Explained (20)

C Programming - Decision making, Looping
C  Programming - Decision making, LoopingC  Programming - Decision making, Looping
C Programming - Decision making, Looping
 
Bsc cs pic u-3 handling input output and control statements
Bsc cs  pic u-3 handling input output and control statementsBsc cs  pic u-3 handling input output and control statements
Bsc cs pic u-3 handling input output and control statements
 
Diploma ii cfpc u-3 handling input output and control statements
Diploma ii  cfpc u-3 handling input output and control statementsDiploma ii  cfpc u-3 handling input output and control statements
Diploma ii cfpc u-3 handling input output and control statements
 
Btech i pic u-3 handling input output and control statements
Btech i pic u-3 handling input output and control statementsBtech i pic u-3 handling input output and control statements
Btech i pic u-3 handling input output and control statements
 
handling input output and control statements
 handling input output and control statements handling input output and control statements
handling input output and control statements
 
Mca i pic u-3 handling input output and control statements
Mca i pic u-3 handling input output and control statementsMca i pic u-3 handling input output and control statements
Mca i pic u-3 handling input output and control statements
 
Unit II chapter 4 Loops in C
Unit II chapter 4 Loops in CUnit II chapter 4 Loops in C
Unit II chapter 4 Loops in C
 
Control Statement IN C.pptx
Control Statement IN C.pptxControl Statement IN C.pptx
Control Statement IN C.pptx
 
loops and iteration.docx
loops and iteration.docxloops and iteration.docx
loops and iteration.docx
 
175035-cse LAB-04
175035-cse LAB-04 175035-cse LAB-04
175035-cse LAB-04
 
Loops In C++
Loops In C++Loops In C++
Loops In C++
 
itretion.docx
itretion.docxitretion.docx
itretion.docx
 
CONTROL STMTS.pptx
CONTROL STMTS.pptxCONTROL STMTS.pptx
CONTROL STMTS.pptx
 
Programming Fundamentals lecture 8
Programming Fundamentals lecture 8Programming Fundamentals lecture 8
Programming Fundamentals lecture 8
 
Chapter 9 - Loops in C++
Chapter 9 - Loops in C++Chapter 9 - Loops in C++
Chapter 9 - Loops in C++
 
Loops in c
Loops in cLoops in c
Loops in c
 
Loop(for, while, do while) condition Presentation
Loop(for, while, do while) condition PresentationLoop(for, while, do while) condition Presentation
Loop(for, while, do while) condition Presentation
 
Types of loops in c language
Types of loops in c languageTypes of loops in c language
Types of loops in c language
 
Decision making and looping
Decision making and loopingDecision making and looping
Decision making and looping
 
C++ chapter 4
C++ chapter 4C++ chapter 4
C++ chapter 4
 

Recently uploaded

call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxAnaBeatriceAblay2
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 

Recently uploaded (20)

call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 

Looping Statements and Flow Charts Explained

  • 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; }
  • 6. Example:- #include<stdio.h> void main() { int a,b,c; printf(“n Enter the no. to print table”); Output:- scanf(“%d”,&a); b=1; while(b<=10) { c=a*b; printf(“n %d x %d = %d”,a,b,c); b++; } getch(); }
  • 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; ------------------- }
  • 8. Example:- #include<stdio.h> void main() { int a,b,c; printf(“n Enter the no. to print table”); Output:- scanf(“%d”,&a); for(b=1;b<=10;b++) { c=a*b; printf(“n %d x %d = %d”,a,b,c); } getch(); }
  • 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
  • 13. Example:- Print table False True Start Enter no. a b=1 Is b<=10 c= a * b Print a x b =c b++ Stop