asked 193k views
1 vote
Write pseudocode for a program that allows a user to enter 20 numbers, then displays all of the numbers, the largest number, the smallest, the total and the average.

1 Answer

3 votes

Answer:

set array of size 20

set larger_no to 0

set smallest_no to 0

for loop 20 times:

asks for input for each input from user

insert each value in array

run for loop 20 times again:

display each number in array

Inside for loop check IF number > larger_no then

set larger_no=number

Inside for loop check ELSE IF number <smallest_no THEN

smallest_no=number

Write smallest_no

Write larger_no

answered
User Aditya Talpade
by
8.8k points
Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.