0% found this document useful (0 votes)
3 views3 pages

Sum and Average Calculation Guide

The document outlines a program to read three numbers, calculate their sum, and display the result. It also describes a second program that calculates the average of three numbers, multiplies it by their sum, and displays the final result. Additionally, it lists several homework problems related to basic arithmetic operations.

Uploaded by

mosesrocke807
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views3 pages

Sum and Average Calculation Guide

The document outlines a program to read three numbers, calculate their sum, and display the result. It also describes a second program that calculates the average of three numbers, multiplies it by their sum, and displays the final result. Additionally, it lists several homework problems related to basic arithmetic operations.

Uploaded by

mosesrocke807
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

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?

You might also like