I have this code where a 4x5 array receives 20 different numbers and as the program runs it will find the largest and smallest number in the series.

```
int largest = 0;
int smallest = 0;
int a[4][5];
for(int x = 0; x < 4; x++)
for(int y = 0; y < 5; y++)
{
cin >> a[x][y];
}
largest = a[0][0];
smallest = a[0][0];
for(int x = 0; x < 4; x++)
for(int y = 0; y < 5; y++)
{
if(largest < a[x][y])
largest = a[x][y];
if(smallest > a[x][y])
smallest = a[x][y];
}
cout << "largest: " << largest << endl;
cout << "smallest: " << smallest << endl;
return 0;
```

In this particular code:

for(int x = 0; x < 4; x++)

for(int y = 0; y < 5; y++)

{

if(largest < a[x][y])

largest = a[x][y];

if(smallest > a[x][y])

smallest = a[x][y];

}

in our class, our prof said that this program will loop for like 20 times(4x5), then how can we make this loop efficient that it will run lesser than 20 times but still get the same result. He was saying something about efficient looping. Tips and suggestions pls? and another thing, he said that we cannot use advance constructs so im thinking this is something about manipulating the loop.