Computer Programming (.
NET Programming)
FLOWCHART by: Teacher Vinjel
https://www.tutorialspoint.com/programming_methodologies/programming_methodologies_flowchart_elements.htm
FLOWCHART
A flowchart is a diagrammatic representation of sequence
of logical steps of a program. Flowcharts use simple
geometric shapes to depict processes and arrows to show
relationships and process/data flow.
https://www.tutorialspoint.com/programming_methodologies/programming_methodologies_flowchart_elements.htm
FLOWCHART
Symbols
FLOWCHART SYMBOLS
SYMBOL SYMBOL NAME PURPOSE
Used at the beginning and
Start / Stop end of the algorithm to show
start and end of the program.
Indicates processes like
Process
mathematical operations.
Used for denoting
Input/ Output
program inputs and outputs.
FLOWCHART SYMBOLS
SYMBOL SYMBOL NAME PURPOSE
Stands for decision
statements in a program,
Decision
where answer is usually Yes
or No.
Shows relationships between
Arrow
different shapes.
Connects two or more parts
On-page Connector of a flowchart, which are on
the same page.
Connects two parts of a
Off-page Connector flowchart which are spread
over different pages.
GUIDELINES FOR DEVELOPING FLOWCHARTS
These are some points to keep in mind while developing a flowchart −
❑ Flowchart can have only one start and one stop symbol
❑ On-page connectors are referenced using numbers
❑ Off-page connectors are referenced using alphabets
❑ General flow of processes is top to bottom or left to right
❑ Arrows should not cross each other
https://www.simplilearn.com/tutorials/data-structure-tutorial/what-is-an-algorithm#what_is_an_algorithm
FLOWCHART
examples
FLOWCHART
examples
LET’S DO AN
Activity
It's rainy season in Valencia City! Knowing what to wear or bring for your commute to
school or work is crucial. You want to create a simple "Daily Commute Weather
Advisory" algorithm that helps a person decide what essentials to prepare based on
the current weather forecast.
Advisory Rules: The algorithm should provide advice based on the following weather
conditions and current time of day:
1. Heavy Rain Advisory: If the weather forecast is "Heavy Rain", advise: "Bring heavy-
duty umbrella and raincoat. Wear boots.“
2. Light Rain Advisory:
If the weather forecast is "Light Rain", advise: "Bring umbrella. Wear comfortable
closed shoes."
3. Sunny Day Advisory: If the weather forecast is "Sunny" and the current_time is
between 10:00 AM and 3:00 PM (inclusive), advise: "Wear light clothing. Bring hat/cap
and water."If the weather forecast is "Sunny" but outside of the 10:00 AM - 3:00 PM
window (i.e., morning or late afternoon/evening), advise: "Wear comfortable clothing.
Bring water."
4. Cloudy Day Advisory:If the weather forecast is "Cloudy", advise: "Bring light jacket
or sweater.“
5. Unclear/Other Weather:If the weather forecast is anything else (or unknown),
advise: "Check local news for updated weather. Bring umbrella just in case."
Problem 12 Scenario:
The Barangay Office of Poblacion, Valencia City, recently conducted a
mini-census to gather basic demographic information about its
households. They collected data about each household, and within each
household, information about its members. They now need an algorithm
to help them quickly analyze this data to find out some key statistics.
The Challenge: Design an algorithm & flowchart that processes the
collected census data to answer two specific questions:
A. How many residents in the entire barangay are of voting age (18
years old and above)?
B. How many households in the barangay have at least one senior
citizen (60 years old and above)?
Assumptions & Rules for the Algorithm:
Desired Output:
A. Voting Age: 18 years old and above.
Two numerical values, clearly
B. Senior Citizen Age: 60 years old and
labeled.
above.
1. Total number of voting-age
C. A household is counted as having a
residents.
senior citizen, the number of qualified
2. Total number of households with
and unqualified voters. The input data
at least one senior citizen.
structure will always be valid (no
missing age fields, etc.).
Expected Output:
HH002:
HH001: Lolo Pedro (72): Voting age, Senior.
Juan (45): Voting age. Lola Pilar (68): Voting age, Senior.
Maria (43): Voting age. Cris (35): Voting age.
Jose (16): Not voting age. Mia (33): Voting age.
Ana (12): Not voting age. Baby Lia (1): Not voting age.
Qualified voters: 2 Qualified voters: 4
Senior: 0 Senior: 2
Unqualified voters: 2 Unqualified voters: 1