View Code of Problem 45

#include<bits/stdc++.h>
using namespace std;
int main(){
	int n;
	cin>>n;
	int a[n][n];
	for(int i=0;i<n;i++)
		for(int j=0;j<n;j++)
			cin>>a[i][j];
	for(int j=0;j<n;j++){
			for(int i=0;i<n;i++){
				cout<<a[i][j]<<" ";
			}
			cout<<endl;
	}
	
	return 0;
/*
Main.cc: In function 'int main()':
Main.cc:17:10: error: expected '}' at end of input
  return 0;
          ^
*/

Double click to view unformatted code.


Back to problem 45