Question: Write a program that finds the smallest and second smallest value in a array with N items. The program receives the integer N on the
Write a program that finds the smallest and second smallest value in a array with N items. The program receives the integer N on the command line, creating a random array with N items with double numbers in the range [-20.0, 20.0) and then find the smallest and second smallest segment in the random array. The program should print these two items.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
