Chilem zrobic odbicie lustrzane srodkowego wiersza, ktos wie jak to zrobic?
#include <iostream>
#include<cstdlib>
#include<time.h>
using namespace std;
const int n=9;
int main()
{
srand(time(NULL));
int tab[n][n];
for(int i=0;i<9;i++)
{
cout << i << ": ";
for(int j=0;j<9;j++)
{
tab[i][j]=rand()%11+0;
cout << tab[i][j];
}
cout << endl;
}
cout << "---------------------"<<endl;
for(int i=0;i<9;i++)
{
cout << i << ": ";
for(int j=0;j<9;j++)
{
if(i==4)
cout << tab[i][9-j];
else
cout << tab[i][j];
}
cout << endl;
}
return 0;
}