Write a program to read 4 numbers and find the maximum, the minimum and average.

what i took in class so far:
if-else statement
switch
for loop

is it even possible to do it with those without it being a very long code

Yes it's possible, assuming that you have learned how to read and print numbers. Your code code will need a loop that executes 4 times. Inside the loop, you read one number and add it to a running sum of all numbers so far.

Once the loop exits, compute the average from the sum.
thanks
Topic archived. No new replies allowed.