//WAP IN C++ TO ADD 2 MATRICES
#include<iostream>
using namespace std;
main()
{
int a[10][10],i,j,n;
cout<<"Enter the Size of the Matrix";
cin>>n;
cout<<"Enter the elements of the Matrix"<<endl;
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
cin>>a[i][j];
}
cout<<"The Martix:"<<endl;
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
cout<<a[i][j]<<" ";
}
cout<<endl;
}
}
No comments:
Post a Comment