View Code of Problem 45

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

Double click to view unformatted code.


Back to problem 45