#include<iostream>
using namespace std;
int main()
{
int a[2][3],i,j,sum=0;
for(i=0;i<2;i++)
{
for(j=0;j<3;j++)
{
cin>>a[i][j];
sum=sum+a[i][j];
}
}
for(i=0;i<2;i++)
{
for(j=0;j<3;j++)
cout<<a[i][j]<<" ";
cout<<endl;
}
cout<<"总和="<<sum;
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: