Let me rephrase the question in this page(http://discuss.codechef.com/questions/55210/newbie-loop-c-please-explain-efficient-looping) because there seems to be a confusion.

Straight to the point.

can anybody suggest another algorithm that would make this code run shorter.

```
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];
}
```

it is observed that it will iterate 20 times, is it possible to make the iteration shorter but still work with the same output? (getting the largest and smallest in an array) We are obliged by our prof not to use advance constructs.