#include <stdio.h>
/*0, 1, 2 //00 11 22 //02 11 20
3, 4, 5,
6, 7, 8
==> 0, 2, 4, 6, 8*/
int main() {
int n = 0;
int m = 0;
scanf("%d %d",n, m);
int arr[n][m];
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
scanf("%d",arr[n][m]);//sud be &arr[i][j];
}
}
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
if(n==m){
printf("%d",arr[n][m]);
}
}
}
for(int i=0;i<n;i++){
for(int j=m;j>=0;j--){
if(m+n==2){
printf("%d",arr[n][m])
}
}
}
To embed this program on your website, copy the following code and paste it into your website's HTML: