You are on page 1of 14

Programming Fundamentals

Lecture No. 4
Understanding Flow chart and
control structures

Flow chart represents the pictorial


representation for execution of a
program.
Flow chart: If Condition
Flow chart IF / ELSE
gotoxy(col,rows)
Loops
• What is Loop?
for (initialization; condition test; increment or
decrement)
{
//Statements to be executed repeatedly
}
Simple Loop Program
Sample Program
1. Inside for loop
2. Input a variable value 5 times.
FOR loop with if condition
Assignment:01, Q#1
• Display the table of 2

2*1=2
2*2=4
..
..

2* 10 = 20
If else If
Review Program REVIEWIF
END

You might also like