THE EXERCISE OF THE GUYS GUYS HAS BEEN MOVED TO THE MENU "EXERCISE OF Teacher"

Min max in the array

Threads: Enter array of n integers. Find the largest and smallest number in array.
Input: The first line is an integer n. The second line 2 n is an integer array, of numbers separated by spaces.
Output: A line of 2 number is the largest and the smallest number in the array separated by spaces.
For example:

input:
3
1 2 3
output:
3 1

You are not logged in? Log in to Submit Now!

9 Comments

Add a Comment