#include<bits/stdc++.h>
using namespace std;
int main ()
{
int a[3][3]={ {-1,2,-3},
{0,2,7},
{2,-2,5}
};
int b[3][3]={ {-1,9,-6},
{0,6,8},
{5-8,4}
};
int c[3][3]={0};
for(int i=0;i<3;i++){
for(int j=0;j<3;j++){
for(int k=0;k<3;k++){
c[i][j]+=a[i][k]*b[k][j];
}
}
}
cout<<"Matrix A: "<<endl;
for(int i=0;i<3;i++){
for(int j=0;j<3;j++){
cout<<a[i][j]<<" ";
}
cout<<endl;
}
cout<<"Matrix B: "<<endl;
for(int i=0;i<3;i++){
for(int j=0;j<3;j++){
cout<<b[i][j]<<" ";
}
cout<<endl;
}
cout<<"Matrix c= "<<endl;
for(int i=0;i<3;i++){
for(int j=0;j<3;j++){
cout<<c[i][j]<<" ";
}
cout<<endl;
}
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKaW50IG1haW4gKCkKewogICAgaW50IGFbM11bM109eyB7LTEsMiwtM30sCiAgICAgICAgICAgICAgICB7MCwyLDd9LAogICAgICAgICAgICAgICAgezIsLTIsNX0KICAgIH07CgogICAgaW50IGJbM11bM109eyB7LTEsOSwtNn0sCiAgICAgICAgICAgICAgICB7MCw2LDh9LAogICAgICAgICAgICAgICAgezUtOCw0fQogICAgfTsKCiAgICBpbnQgY1szXVszXT17MH07CiAgICBmb3IoaW50IGk9MDtpPDM7aSsrKXsKICAgIGZvcihpbnQgaj0wO2o8MztqKyspewogICAgICAgIGZvcihpbnQgaz0wO2s8MztrKyspewogICAgICAgICAgICBjW2ldW2pdKz1hW2ldW2tdKmJba11bal07CiAgICAgICAgfQogICAgfQogICAgfQogICAgY291dDw8Ik1hdHJpeCBBOiAiPDxlbmRsOwogICAgZm9yKGludCBpPTA7aTwzO2krKyl7CiAgICAgICAgZm9yKGludCBqPTA7ajwzO2orKyl7CiAgICAgICAgICAgIGNvdXQ8PGFbaV1bal08PCIgIjsKICAgICAgICB9CiAgICAgICAgY291dDw8ZW5kbDsKICAgIH0KICAgIGNvdXQ8PCJNYXRyaXggQjogIjw8ZW5kbDsKICAgIGZvcihpbnQgaT0wO2k8MztpKyspewogICAgICAgIGZvcihpbnQgaj0wO2o8MztqKyspewogICAgICAgICAgICBjb3V0PDxiW2ldW2pdPDwiICI7CiAgICAgICAgfQogICAgICAgIGNvdXQ8PGVuZGw7CiAgICB9CiAgICBjb3V0PDwiTWF0cml4IGM9ICI8PGVuZGw7CiAgICBmb3IoaW50IGk9MDtpPDM7aSsrKXsKICAgICAgICBmb3IoaW50IGo9MDtqPDM7aisrKXsKICAgICAgICAgICAgY291dDw8Y1tpXVtqXTw8IiAiOwogICAgICAgIH0KICAgICAgICBjb3V0PDxlbmRsOwogICAgfQp9Cg==