Problem: Write a program to read three numbers and display the sum.
Step 1- Get the three numbers
Step 2- Store the three numbers in the computer
Step 3 – Add the three numbers and store the answer
Step 4- Display the Answer
Narrative
Step 1 – Enter A, B and C
Step 2- Sum=A+B+C
Step 3 – Display Sum
Input Process Output
A Sum=A+B+C Sum
B
C
Pseudocode
Start
Read A
Read B
Read C
Sum=A+B+C
Write Sum
Stop
Problem: Read three numbers, Find the average and multiply the average by the
sum of the three numbers
Steps
Step 1- Get the three numbers
Step 2- Enter the three numbers into the computer and store them
Step 3 – Calculate The Average and store the answer
Step 4 – Calculate the Sum and Store the answer
Step 5 – Multiply the Average and the Sum and Store the Answer.
Pseudocode
Start
Read A
Read B
Read C
AVG=A+B+C/3
Sum=A+B+C
A2=AVG*Sum
Display A2
Stop
Input Process Output
A AVG=A+B+C/3 A2
B Sum=A+B+C
C A2=AVG*Sum
Problems HW
1) Read 2 Numbers and Multiply them by eachother
2) Add three numbers, one of the numbers is 5. Display the answer
3) Find the Product of 4 numbers and display the answer
4) Mary has 7 potatoes, mark stole 5 of them, How many potatoes does mary
have left?
5) Jane has 5 apple trees, if 3 died then how many apple trees would she
have left.
6) Bob the cat is visiting the bank, bob has a certain amount of money in the
bank and is going to be getting a 15% interest on his money. How much
money does bob the cat have now?