Expand|Select|Wrap|Line Numbers
- #include<iostream>
- #include<iomanip>
- using namespace std;
- int main(){
- int a,b;
- int Rowsize , Colsize ;
- int A[Rowsize][Colsize];
- cout<<"Enter number of Row: ";
- cin>>a;
- Rowsize=a;
- cout<<"Enter number of Colums ";
- cin>>b;
- Colsize=b;
- for(int Row = 0; Row < Rowsize; Row++)
- for(int Col=0;Col<Colsize;Col++)
- {
- cout<<"\nEnter A [ "<<Row
- <<"][" << Col <<"]: ";
- cin>> A[Row][Col];
- }
- cout<<"\nContents of matrix A:\n";
- for(int Row= 0;Row < Rowsize; Row++)
- {
- for (int Col = 0; Col < Colsize;Col++)
- cout<< setw(4) << A[Row][Col];
- cout<< endl;
- }
- system("pause");
- return 0;
- }