in questa riga devi scrivere - mat[b][a]- altrimenti memorizzi sempre n-m
codice:
mat[n][m]=num;
al posto di queste righe
codice:
for (h=0; h<n; h++)
 {
 cout<<mat[h][n]; 
}
codice:
cout << mat[k-1][h-1];
ciao