Professional Documents
Culture Documents
K. MORGAN
WHAT IS THE DIVIDE AND CONQUER APPROACH?
The divide and conquer approach is breaking a problem into sub problems until it
becomes simple enough to be solved directly. Each individual sub problem is then
combined to make one complete solution.
IPO
CHART
Computer systems include hardware used for input,
What is given All the instructions that must be The expected results
I
Key Words (IPO - Input, Processing and Output)
Write
Return
1Example: Prompt the user to enter name, year of birth and current
year calculate and display the users age.
year_of_birth year_of_birth
current_year current_year
Calculate Age
A VARIABLE is a storage location
in the computer’s memory that is
subject to change. Underscores and
initial capitalization are used for
variables with more than one word to
link each word.
radius radius
Calculate Area
Return Area
Class Work
1. Write a program that prompts the users to input
the height of three friends, find and output the
average height.