Please help with the following program... I am trying to find the minimum and maximum values of the user input "value" in the nested for loop. I tried using an if/else
int main() {
const int NUM_ROWS = 2;
const int NUM_COLS = 2;
int milesTracker[NUM_ROWS][NUM_COLS];
int i;
int j;
int maxMiles = 0; // Assign with first element in milesTracker before loop
int minMiles = 0; // Assign with first element in milesTracker before loop
int value;
for (i = 0; i < NUM_ROWS; i++){
for (j = 0; j < NUM_COLS; j++){
cin >> value;
milesTracker[i][j] = value;
}
}
************CODE SHOULD GO HERE*********************
* What is the initial value of count?
* Why do you compare against last element of the matrix?
* Why do you compare only the diagonal elements of the matrix?