Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
3 views

Algorithm Flowchart

The document outlines the objectives of describing and creating algorithms and flowcharts for problem-solving in programming. It defines an algorithm as a sequence of specified actions to solve a problem and provides an example for adding two numbers. Additionally, it explains flowcharts as diagrams that represent processes and includes rules for creating them, along with an activity for creating an algorithm and flowchart to determine if a number is odd or even.

Uploaded by

eryanakaylee
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Algorithm Flowchart

The document outlines the objectives of describing and creating algorithms and flowcharts for problem-solving in programming. It defines an algorithm as a sequence of specified actions to solve a problem and provides an example for adding two numbers. Additionally, it explains flowcharts as diagrams that represent processes and includes rules for creating them, along with an activity for creating an algorithm and flowchart to determine if a number is odd or even.

Uploaded by

eryanakaylee
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

OBJECTIVES:

1. DESCRIBE AN ALGORITHM/
FLOWCHART
2. CREATE AN ALGORITHM /
FLOWCHART FOR A PROBLEM
USES / ADVANTAGES OF
ALGORITHM /
FLOWCHART IN
SOLVING A
PROGRAMMING
PROBLEM
ALGORITH M
AN ALGORITHM IS A
PROCEDURE OR FORMULA FOR
SOLVING A PROBLEM, BASED
ON CONDUCTING A SEQUENCE
OF SPECIFIED ACTIONS.
EXAMPLE OF AN
ALGORITHM
TO ADD TWO NUMBERS
ENTERED BY A USER.
Step 1: Start
Step 2: Declare variables num1,
num2 and sum.
Step 3: Read values num1 and num2.
Step 4: Add num1 and num2 and
assign the result to sum.
sum=num1+num2
Step 5: Display sum
Step 6: Stop
REMINDERS

• VARIABLE IN PROGRAMMING WORLD REFERS TO A MEMORY SPACE


WHERE ANY VALUE ASSIGNED TO IT EITHER CONSTANT OR
TEMPORARY WILL BE STORED

• A VARIABLE NAME IS ANY NAME GIVEN WHICH MAY BE


ALPHANUMERIC THAT REPRESENTS OR HOLDS THE VALUE OF A DATA
TYPE (INTEGER, FLOAT, STRING, CHARACTER)

• DATA TYPES:
• INTEGER – ANY WHOLE NUMBER
• FLOAT – A DECIMAL VALUE
• CHARACTER – A SINGLE LETTER
• STRING – AN ARRAY OF LETTERS
FLOWC H A RT
A FLOWCHART IS A
DIAGRAM THAT
DEPICTS A PROCESS,
SYSTEM OR
COMPUTER
ALGORITHM.
Purpose Description
Symbol
Used to indicate the
Flow line flow of logic by
connecting symbols.
Used to represent
Terminal
start and end of
(Stop/Start)
flowchart.

Input/ Used for input


Output and output operation.
Used for arithmetic
Processing operations and data-
manipulations.

Used to represent the


operation in which
Decision there are two
alternatives, true and
false.
On-page Used to join different
Connector flowline
FLOWCHART:
ADDITION
PROBLEM
RULES
START END
• A FLOWCHART SHOULD START AND END ONCE.

• PROCESSES (STEPS) SHOULDPROCESS


PROCESS 1
BE WRITTEN/PRESENTED
PROCESS 3
2
SEPARATELY CONNECTED WITH AN ARROW.

• DECISION SYMBOL HAS ONLY


YES
TWO POSSIBLE
TRU ANSWERS FALSE
?
(YES OR
NO; TRUE OR FALSE)
? E

NO
ACTIVITY: PAIR WORK
• MAKE AN ALGORITHM AND FLOWCHART OF THE GIVEN
PROBLEM BELOW:
• ALLOW THE USER TO GIVE ANY INTEGER VALUE THEN IDENTIFY
THE NUMBER AND DISPLAY WHETHER IT IS ODD OR EVEN.
EXAMPLE:
GIVE A NUMBER: *ASSUMING THAT THE USER
ENTERED 5 AS THE ANSWER
IT IS AN ODD NUMBER!

You might also like