View Code of Problem 45

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

Double click to view unformatted code.


Back to problem 45