Exercise : smallestLargest practice-it

Write a method named smallestLargest that prompts the user to enter numbers, reads them, then prints the smallest and largest of all the numbers typed in by the user. For example:

How many numbers do you want to enter? 4
Number 1: 5
Number 2: 11
Number 3: -2
Number 4: 3
Smallest = -2
Largest = 11