#include<stdio.h>
#include<conio.h>
void main(){
int i,j,k,l;
int mat[4][4]={00,01,10,11},{10,11,12,13},{20,21,22,23},{30,31,32,33};
for (i=0,j=0;j<4;j++)
{
for (k=3,l=3;l>=0;l--)
{
int t=mat[i][j];
mat[i][j]=mat[k][l];
mat[k][l]=t;
}
}
for (i=1,j=0;j<4;j++)
{
for (k=2,l=3;l>=0;l--)
{
int t=mat[i][j];
mat[i][j]=mat[k][l];
mat[k][l]=t;
}
}
//after this write code to print all the values, task achieved
getch();
}
1. Don't use conio.h
2. Don't use void main, main must return int.
3. Use [code] tags.
4. Don't do someone's homework for them.
5. Explain what you're doing. That code only contains one comment; and that's just to emphasise how much easier you've made OP's homework. All he has to do is write a couple of std::cout's and he's finished.
I can't read your code, it's illegible, so I don't even know if that's even correct.