#include<iostream>
#include<cstdlib>
#include<cmath>
int main()
{
int a,b,c;
int d,e,f;
double x,y,det;
cout<<"解二元一次聯立ax+by=c"<<endl;
cout<<" dx+ey=f"<<endl;
cout<<"請輸入a、b、c、d、e、f之值"<<endl;
cin>>a>>b>>c>>d>>e>>f;
det=a*e-d*b;
x=(c*e-b*f)/det;
y=(-d*c+a*f)/det;
cout<<"您的解答為:"<<endl;
cout<<"x="<<x<<endl;
cout<<"y="<<y<<endl;