int n = o valorea;
int a;
int b;
int c;
int d;
int mat[n][n]
swich x
{
case 'N' : a = 0; b= n; c = 0; d = n/2; break;
case 'S' : a = 0; b= n; c = n/2; d = n; break;
case 'E' : a = n/2; b = n; c = 0; d = n; break;
case 'V' : a = 0; b = n/2; c = 0; d = n; break;
}
for(int i = a; i < b; i++)
{
printf("\n");
for(int j = c; j < d; j++)
{
printf("%d ", mat[i][j]);
}
}
Asta e partea relevanta, se mai pot face diferite ajustari.