View Code of Problem 45

#include <stdio.h>
#include <math.h>
int main(){
   int t[20][20];
   int n;
   scanf("%d",&n);
   for(int i=0;i<n;i++){
    for(int j=0;j<n;j++){
        scanf("%d",&t[i][j]);
    }
   }
   int i ,j;
   for( i=0;i<n;i++){
    for( j=0;j<n-1;j++){
        printf("%d ",t[j][i]);
    }
    printf("%d",t[j][i]);
    printf("\n");
   }

   return 0;
}

Double click to view unformatted code.


Back to problem 45