#include<iostream>
using namespace std;
int main() {
int r,c,i,j,a[5][5],b[5][5],division[5][5];
cout<<"enter the number of rows\n";
cin>>r;
cout<<"enter the number of columns\n";
cin>>c;
cout<<"enter the elements of matrix a\n";
for(i=0;i<r;i++){
for(j=0;j<c;j++) {
cin>>a[i][j];
}
}
cout<<"enter the elements of matrix b\n";
for(i=0;i<r;i++){
for(j=0;j<c;j++) {
cin>>b[i][j];
}
}
for(i=0;i<r;i++){
for(j=0;j<c;j++) {
division[i][j]=a[i][j]/b[i][j];
}
}
cout<<"division of the two matrices is";
for(i=0;i<r;i++){
for(j=0;j<c;j++) {
cout<<division[i][j];
}
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: