Answer to Question #211123 in Algorithms for Emmanuel Kwarfo

Question #211123

Write an algorithm to determine the average of any five(5) numbers and display the below after: the sum, the product and the average.



1
Expert's answer
2021-06-28T07:24:01-0400
Algorithm:


Step 1  Create variable called number
Step 2  Create variable called sum=0
Step 3  Create variable called average
Step 4  Create variable called product=1
Step 5  for i := 1 to 5 Step 1 do 
Step 6     Get number from the user
Step 7     sum := sum+number
Step 8     product:=product*number
Step 9  average := sum/5
Step 10 Display sum
Step 11 Display product
Step 12 Display average

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS