View Code of Problem 45

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

Double click to view unformatted code.


Back to problem 45