#include<iostream>
using namespace std;
int main(){
int arr[2][2];
int sum;
cout<<"|"<<"a1"<<" "<<"b1"<<"|"<<endl;
cout<<"|"<<"a2"<<" "<<"b2"<<"|"<<endl;
cout<<"请输入a1:";
cin>>arr[0][0];
cout<<"请输入b1:";
cin>>arr[0][1];
cout<<"请输入a2:";
cin>>arr[1][0];
cout<<"请输入b2:";
cin>>arr[1][1];
cout<<"|"<<arr[0][0]<<" "<<arr[0][1]<<"|"<<endl;
cout<<"|"<<arr[1][0]<<" "<<arr[1][1]<<"|"<<endl;
sum=arr[0][0]*arr[1][1]-arr[0][1]*arr[1][0];
cout<<"sum="<<sum<<endl;
int arrr[3][3];
int asum;
cout<<"| a1 b1 c1 |"<<endl;
cout<<"| a2 b2 c2 |"<<endl;
cout<<"| a3 b3 c3 |"<<endl;
cout<<"请输入a1:";
cin>>arr[0][0];
cout<<"请输入b1:";
cin>>arr[0][1];
cout<<"请输入c1:";
cin>>arr[0][2];
cout<<"请输入a2:";
cin>>arr[1][0];
cout<<"请输入b2:";
cin>>arr[1][1];
cout<<"请输入c2:";
cin>>arr[1][2];
cout<<"请输入a3:";
cin>>arr[2][0];
cout<<"请输入b3:";
cin>>arr[2][1];
cout<<"请输入c3:";
cin>>arr[2][2];
cout<<"|"<<arr[0][0]<<" "<<arr[0][1]<<" "<<arr[0][2]<<"|"<<endl;
cout<<"|"<<arr[1][0]<<" "<<arr[1][1]<<" "<<arr[1][2]<<"|"<<endl;
cout<<"|"<<arr[2][0]<<" "<<arr[2][1]<<" "<<arr[2][2]<<"|"<<endl;
}
三阶行列式的sum不知道怎么写。。。