Answer to Question #186410 in Algorithms for Andrews Seyram

Question #186410

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

c. Describe what is a variable and how is it used in a program.


1
Expert's answer
2021-04-27T16:13:42-0400

b. The pseudocode is below:

a=input(First number)
b=input(Second number)
c=input(Third number)
d=input(Fourth number)
e=input(Fifth number)
f=input(Sixth number)
Sum=a+b+c+d+e+f
Prd=a*b*c*d*e*f
Avg=Sum/6
Print(Sum)
Print(Prd)
Print(Avg)

c. The variable is a quantity that may take any value defined by the user or program code. It is used in programs to store values and perform operations with these values.


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
New on Blog
APPROVED BY CLIENTS