logo CodeStepByStep logo


Write a console program that prompts the user to type a given number of integers, then prints the largest and smallest of all the numbers typed in by the user. You may assume the user enters a number greater than 0 for the How many numbers to read. Here is an example dialogue:

How many numbers? 4
Next number? 5
Next number? 13
Next number? -5
Next number? 2
Biggest = 13
Smallest = -5
Complete program: Write an entire program that you could put into a file and run outside of CodeStepByStep.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.