+ All Categories
Home > Education > Flowcharts

Flowcharts

Date post: 19-May-2015
Category:
Upload: solielmutya
View: 295 times
Download: 0 times
Share this document with a friend
Description:
Different flowchart symbols and examples.
Popular Tags:
24
FLOWCHARTS DECISION/ BRANCHING Engr. Soliel G. Mutya DLSU-CSB Minter2
Transcript
Page 1: Flowcharts

FLOWCHARTS DECISION/ BRANCHING

Engr. Soliel G. MutyaDLSU-CSB

Minter2

Page 2: Flowcharts

COMPETENCY

Represent conditional statements using flowcharting.

Page 3: Flowcharts

ALGORITHM

It is a detailed sequence of simple steps that are needed to solve a problem.

Page 4: Flowcharts

FLOWCHART

A graphic representation of an algorithm.

Graphically depicts the logical steps to carry out a task and shows how the steps relate to each other.

Used during the design phase of programming to work out the logical flow.

Page 5: Flowcharts

BASIC FLOWCHART SYMBOLS

FLOWCHART SYMBOL

FLOWCHART NAME

FUNCTION

Terminator / Terminal Block

This symbol can only be seen at the beginning and end of the program.

Flow lines Defines logical sequence of the program. It gives the direction of logic flow.

Input / Output Block The inputting of data for processing, and printing out of processed data.

Process Block Manipulation of data (assignments and mathematical computation

Page 6: Flowcharts

BASIC FLOWCHART SYSMBOLSFLOWCHART SYMBOL

FLOWCHART NAME

FUNCTION

Decision Block Denotes a decision to be made. Process conditions using relational operators. Used for trapping and filtering data.

On-page Connector Connects to the flowchart to avoid spaghetti/redundant connection on the same page.

Off-page Connector Connects the flowchart on different page to avoid spaghetti/redundant connection.

Initialization Used to initialize a value; mostly used in looping process.

Page 7: Flowcharts

Flowcharting Guidelines

1. The flowchart should flow from the top to bottom.

2. If the chart becomes complex, utilize connecting marks.

3. Avoid intersecting flow lines.4. Use meaningful descriptions in the

symbol.

Page 8: Flowcharts

Sequential Structure

Input a,b

Sum=a+b

Ave=(sum/2)

Display Sum, Ave

start

End

Page 9: Flowcharts

EXAMPLE 1

Design a flowchart that will compute for the volume of a box. The box has 3 dimensions (L, W, and H).

Page 10: Flowcharts

Selection Structure

IF condition

ELSElogic

THENlogic

False

True

Page 11: Flowcharts

EXAMPLE 2

Create a flowchart that will input grade and determine if the student is “PASSED” or “FAILED”. Assume 75 and above is the passing mark.

Page 12: Flowcharts

Repetition Structure

Do-While Loop

IF conditio

n

ELSElogic

True

False

ELSElogic

IF conditi

on

Do-Until Loop

False

True

Page 13: Flowcharts

EXAMPLE 3

Create a flowchart that will display 11 to 20 using a looping control structure

Page 14: Flowcharts

EXAMPLE 4

Create a flowchart that will compute for the simple interest 5 times. Assume: Interest=Principal Value * Rate * Time.

Page 15: Flowcharts

EXAMPLE 5

Design a flowchart that will input two numbers and display the larger number entered.

Page 16: Flowcharts
Page 17: Flowcharts
Page 18: Flowcharts
Page 19: Flowcharts
Page 20: Flowcharts
Page 21: Flowcharts

ACTIVITY 5

1. Any customer whose total purchase is at least 1,000 Php will be given a 10% discount. Construct a flowchart with equivalent Pseudocode that will input the customer’s purchase and output his bill.2. Construct a flowchart and Pseudocode that will display MINTER2 ten times.3. Create a flowchart and Pseudocode that will enter hours and display if the employee has overtime hours if he exceeds 40 hours.4. Every leap year is divisible by 4. Design the flowchart and Pseudocode that will input YEAR and display whether the year is a “LEAP YEAR” or “ORDINARY YEAR”.

Page 22: Flowcharts

ASSIGNMENT 3

1. Design the flowchart with equivalent Pseudocode that examines the value of a variable called “temp” then display the following messages, depending on the value assigned to temperature:

TEMPERATURE MESSAGE

Less than 0 “It is an ICE”

Between 0 and 100 “It is a WATER”

Exceeds 100 “It is a STEAM”

Page 23: Flowcharts

ASSIGNMENT 32. A student grade may be calculated based on his score. Construct a flowchart with equivalent Pseudocode that will input score and display its equivalent grade.SCORE GRADE

Below 60 F

At least 60 but below 70 D

At least 70 but below 80 C

At least 80 but below 90 B

At least 90 A

Page 24: Flowcharts

Recommended