0% found this document useful (0 votes)
124 views7 pages

Cpe 41 Lec - Flowchart

The document discusses flowcharts, including what they are, common symbols used, and examples of sequential, decision-making, and looping structures. It then provides 8 problems and asks to draw flowcharts for each one, showing the steps to input values, perform calculations, and output results.

Uploaded by

majorie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
124 views7 pages

Cpe 41 Lec - Flowchart

The document discusses flowcharts, including what they are, common symbols used, and examples of sequential, decision-making, and looping structures. It then provides 8 problems and asks to draw flowcharts for each one, showing the steps to input values, perform calculations, and output results.

Uploaded by

majorie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

FLOWCHART

ENGR. MARIFE K. VILLAREAL


LECTURER
Flow Charts

Why flowcharting?
Often the best way to understand a problem is to draw pictures. Pictures often provide us
with a more complete idea of the situation than a series of short word or phrases can.
However, pictures combined with text provide an extremely powerful tool for
communication and problem solving. Algorithms can be developed more quickly when a
flow chart is built to represent such an algorithm. Flowcharts need less effort to understand
then an algorithm.

What is a flowchart?
A flowchart is a graphical representation of the operations involved in a data processing
system.
 Symbols are used to represent particular operations or data
 Flow lines indicate the sequence of operations (Top to down sequence).

Terminal (Start or Stop of program flow)

Input / Output operation

Connector

Process to be performed

Decision / Comparison Operation


Note that one arrow goes in, two go out.

Yes

No
Sequential Structure Decision Making Structure Looping Structure
A series of processes that follow in A condition exists that may change the Often, we might wish to perform the
order. order or types of processes to be same set of processes a number of
followed. times, we can perform a loop and do the
For example, to wash your hair; same set of actions over and over until a
1. Wet hair For example, IF the light is red THEN I STOPPING condition occurs.
2. Apply shampoo will stop OTHERWISE I will go. Failure to provide a STOP condition will
3. Rinse cause the process to go into an
INFINITE LOOP

An example of a LOOP could be to


Drive Car
display the word 'SCHOOL' on the
screen 7 times.

Wet hair Light is No Go Print


Red? ‘School’

Yes Is No
Apply Shampoo Counter Add 1 to
Stop = 7? Counter

Yes
Rinse
Problem: Find the total of two Problem: Find the average of two
numbers. numbers.
Problem:
Explain what is happening in
this flowchart
 Problem: Input a mark. Print
'Fail' if it is less than 50,
otherwise print 'Pass'.
Assignment1:
For each of the problems below, draw a flow chart;
Answer also slide 5 and 6.
1.Input the length L and the breadth B, calculate and output the area of a
rectangle.
2.User inputs radius and flowchart calculates and shows the area of a circle
3.Print the number from 1 to 100 (Hint: use a counter & loop)
4.Enter 20 marks and print their average.
5.Ask a person for a number between 1 and 100, ask again if they give you a
number outside that range
6.Input 40 marks. Count and print how many marks are below 50.
7.Input M and print the square of M if it is between 1 and 10.
8.Input a mark. Calculate and output a student's grade;
80 < A <= 100
60 < B <= 80
40 < C <= 60
0 <= U <= 40

You might also like