#include <iostream>
#define m 100
using namespace std;
int main()
{
int arr[m][m],r,c,i,j;
cout<<"Enter Your Number of Row and Column: ";
cin>>r>>c;
for(i=0;i<r;i++){
for(j=0;j<c;j++){
cout<<"Enter "<<i<<" Row "<<j<<" Column :";
cin>>arr[i][j];
}
}
for(i=0;i<r;i++){
for(j=0;j<c;j++){
cout<<arr[i][j]<<" ";
}
cout<<endl;
}
cout<<"Enter Your Row and Column and you want to access: ";
cin>>r>>c;
cout<<"Your Element is "<<arr[r][c];
return 0;
}
No comments:
Post a Comment