Algorithm Basics
Algorithm Basics
Definition of algorithm
What is an algorithm?
• An algorithm is a solution to a problem expressed as a sequence of defined steps
• Methods of writing an algorithm before attempting to program a solution include:
o Structured English
o Pseudocode
o Flowcharts
Structured English
INPUT Age
IF Age >= 18 THEN
OUTPUT "Welcome to the site"
ELSE
OUTPUT "Sorry, this site is for users 18 and over"
ENDIF
Flowcharts
Identifier tables
What is an identifier table?