logo CodeStepByStep logo

biggestAndSmallest

Related Links:

Write a console program with a main function 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 number of numbers to read. Here is an example dialogue:

Number of numbers? 4
Number 1: 5
Number 2: 13
Number 3: -5
Number 4: 2
Biggest = 13
Smallest = -5
Function: Write a C++ function as described, not a complete program.

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.