Question: Find the maximum value and minimum value in milesTracker. Assign the maximum value to maxiMiles, and the minimum value minMiles. Ex If the input is:

Find the maximum value and minimum value in milesTracker. Assign the maximum value to maxiMiles, and the minimum value minMiles.
Ex If the input is:
-10,20,30,40
the output is:
Min miles: -10
Max miles: 40
(Notes)
Learn how our autograder works
import java.util.scanner;
public class ArrayskeyValue {
public static void main (String [] args) f
Scanner schr = new Scanner(System, in);
final int NUM_ROWS =2;
final int NUM_COLS =2;
int [][] milesTracker = new int[NUM_ROWS][NUM_COLS];
int i;
int j;
int maxMiles; // Assign with first element in milesTracker before Loop
int minMiles; // Assign with first element in milestracker before Loop
for milesTracker. length; i++
for milesTracker i. length ;j++
milestracker [i][j]=scnr. nextInt();
}
}
 Find the maximum value and minimum value in milesTracker. Assign the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!