The only thing you're outputting in the posted code are the strings:
Code:
benchmark 1/nbenchmark 2/nbenchmark 3/nbenchmark 4/nbenchmark 5
(Presumably you meant to use backslashes and not the forward slashes you used.)
If your program used to output anything else, you've removed it from the code you posted.
Also, you should include the initialization of grid, otherwise we can't run it.
And you can remove some ugly (and error prone) repetition like this:
Code:
long long int highest = 0, m;
int grid [20][20] = // i initialize the array here
cout << endl << "benchmark 1/n";
for(int a=0; a < 20; a++)
for(int b=0; b < 17; b++) {
m = grid[a][b]*grid[a][b+1]*grid[a][b+2]*grid[a][b+3];
if(highest < m)
highest = m;
}
I think it's also necessary to cast the first grid[][] to long long to prevent overflow:
Code:
m = (long long)grid[a][b]*grid[a][b+1]*grid[a][b+2]*grid[a][b+3];