解二元一次方程神器
#include<bits/stdc++.h>
using namespace std;
double a1=107,b1=40,c1=147;
double a2=170,b2=271,c2=441;
int main(){
cout<<"ax+by=c,dx+ey=f\n依次输入a b c d e f\n";
cin>>a1>>b1>>c1>>a2>>b2>>c2;
cout<<a1<<" x + "<<b1<<" y = "<<c1<<endl;
cout<<a2<<" x + "<<b2<<" y = "<<c2<<endl;
cout<<"x = "<<-(c2*b1-c1*b2)*1.0/(a1*b2-a2*b1)<<endl;
cout<<"y = "<<(c2*a1-c1*a2)*1.0/(a1*b2-a2*b1);
return 0;
}