a) Write pseudocode to input 10 positive numbers and find the total and the average.
b) Write pseudocode to input positive numbers, –1 to finish, and find the total and the average.
c) Explain why you chose the loop structures for each task
plzzz help meeeee
Answers
Answered by
20
Answer:
a. Write pseudo code to input 10 positive numbers and find the total and the average.
Total<-- 0
Input numbers
Printf (“Input 10 positive numbers”)
If numbers > 0
Then number= Total
Number/10= Average
End if
Output Total & Average
b. Write pseudo code to input positive numbers, –1 to finish, and find the total and the average.
Total<-- 0
Input numbers
Printf (“Input 10 positive numbers, -1 to finish”)
While Mark<> -1 DO
If numbers > 0
Then number= Total
Number/10= Average
End if
Output Total & Average
c. Explain why you chose the loop structures for each task.
It makes it easier to be able to find the answer instead of typing everything manually.
Explanation:
I have no explanation.
Similar questions