Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created November 19, 2020 12:36
Show Gist options
  • Save amankharwal/ecdeec55d3ca23c43ecab733ead82171 to your computer and use it in GitHub Desktop.
Save amankharwal/ecdeec55d3ca23c43ecab733ead82171 to your computer and use it in GitHub Desktop.
#include<iostream>
using namespace std;
int main(){
int n, m;
cin>>n>>m;
int arr[n][m];
for(int i = 0; i < n; i++){
for(int j = 0; j < m; j++){
cin>>arr[i][j];
}
}
cout<<"Matrix : \n";
for(int i = 0; i < n; i++){
for(int j = 0; j < m; j++){
cout<<arr[i][j]<<" ";
}
cout<<"\n";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment