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
Type your C++ solution code here:


This is a function exercise. Write a C++ function as described. Do not write a complete program; just the function(s) above.

You must log in before you can solve this problem.

Log In

Need help?

If you do not understand how to solve an exercise or why your solution doesn't work, please contact your TA or instructor.
If something seems wrong with the site (errors, slow performance, incorrect tests, etc.), please

Is there a problem? Contact a site administrator.

©, all rights reserved.