Go: package main

import (
        "fmt"
        "bufio"
        "os"
)

func main() {
        var a, b, c, d, e, f float64
        sc := bufio.NewScanner(os.Stdin)
        for sc.Scan() {
                fmt.Sscanf(sc.Text(), "%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)

                det := a*e - b*d
                x := (e*c - b*f) / det
                y := (a*f - c*d) / det
                fmt.Printf("%04f %04f\n", x, y)
        }
}

C++: #include <stdio.h>

int main(void){
	double a,b,c,d,e,f;
	double ans_x,ans_y;
	while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) != EOF){
		ans_y = (c*d-a*f) / (b*d-a*e);
		ans_x = (c - (b*ans_y)) / a;

		printf("%.3lf %.3lf\n",ans_x,ans_y);
	}

	return 0;
}

C++: #include<stdio.h>
int main()
{
    double a,b, c, d, e, f, x,y;
    while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF)
    {
        y=(a*f-c*d)/(a*e-d*b);
        x=(c-b*y)/a;
        printf("%.3f %.3f\n",x,y);
    }
}

C++: #include<cstdio>
#include<iostream>
using namespace std;

int main(){
	
	double a, b, c, d, e, f, x=0, y=0; // ???????°???°?????°??? %f
	while(cin >> a >> b >> c >> d >> e >> f){
		x = (b*f-c*e)/(b*d-a*e);
		y = (a*f-c*d)/(a*e-b*d);

		printf("%.3f %.3f\n",x,y);
	}
}

C++: #include<iostream>
#include<iomanip>
#include<stdio.h>

using namespace std;

int main()
{
	double a,b,c,d,e,f;
	double x,y;

	while(true){
		cin >> a >> b >> c >> d >> e >> f;

		double tempb = b;

		a*=e;b*=e;c*=e;
		d*=tempb;e*=tempb;f*=tempb;
		a-=d;b-=e;c-=f;

		x = c/a;
		y = (f-(d*x))/e;

		if(x == -0)
			x = 0;
		if(y == -0)
			y = 0;
		printf("%0.4lf %0.4lf\n",x,y);
	}

	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>

using namespace std;

int main (int argc, char const* argv[])
{
    double a,b,c,d,e,f;
    double x,y;
    
    while(cin >> a >> b >> c >> d >> e >> f){
        if(a && b && d && e){
            x = (c*e - b*f) / (a*e - b*d);
            y = (c - a*((c*e - b*f) / (a*e - b*d)))/b;
        }

        if(!a){
            y = c/b;
            x = !e ? x = f/d : (f - e*(c/b))/d;
        }

        if(!b){
            x = c/a;
            y = !d ? f/e : (f - d*(c/a))/e;
        }

        if(!d){
            y = f/e;
            x = !b ? c/a : (c - e*(f/e))/a;
        }

        if(!e){
            x = f/x;
            y = !a ? c/b : (c - a*(f/x))/b;
        }

        x = round(x * 1000)/1000.0;
        y = round(y * 1000)/1000.0;
        
        if(x == 0) x = 0;
        if(y == 0) y = 0;
        
        printf("%.03lf %.03lf\n",x,y);
    }
    
    return 0;
}

C++: #include<iostream>
#include<cmath>
#include<cstdio>
using namespace std;
int main(){
  double a,b,c,d,e,f;

 
  while( cin>>a>>b>>c>>d>>e>>f){
  
    double x,y;
  
    y=(c*d-a*f)/(b*d-a*e);
    x=(c-b*y)/a;
  
    //cout<<x<<' '<<y<<endl;
    printf("%.4lf %.4lf\n",x,y);
  }
}

C++: #include <cstdio>

using namespace std;

int GCD(int x, int y)
{
    if (y == 0) return x;
    
    return GCD(y, x % y);
}

int LCM(int x, int y)
{
    return x / GCD(x, y) * y;
}

int main() {
	int a, b, c, d, e, f;
	int _a, _b, _c, _d, _e, _f;
	double x, y;
	int _x, _y, _z;
	int multiTop, multiBottom;
	int common;
	
	while (scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF) {
	    common = LCM(a, d);
	    multiTop = common / a;
	    multiBottom = common / d;
	    
	    _a = common;
	    _b = b * multiTop;
	    _c = c * multiTop;
	    
	    _d = common;
	    _e = e * -multiBottom;
	    _f = f * -multiBottom;
	    
	    _y = _b + _e;
	    _z = _c + _f;
	    
	    y = (double)_z / (double)_y;
	    
	    _c = c - (b * y);
	    
	    x = (double)_c / (double)a;
	    
	    printf("%.3f %.3f\n", x, y);
	}
	
	return 0;
}

C++: #include <iostream>
#include <cstdio>
int main()
{
    double a,b,c,d,e,f,y,x;
    while(std::cin >> a >> b >> c >> d >> e >> f) 
    {
        x = (double)((e*c-b*f) / (a*e-b*d));
        y = (double)((-(d*c)+a*f) / (a*e-b*d)); 
        if(x==0)x=0;
        if(y==0)y=0;
        printf("%.3lf %.3lf\n",x,y);
    }  
    return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int b,a,e,d,f,i,c;
	float y,x;
	while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF)  {
			y=(c*d-a*f)/(b*d-a*e);
			x=(c-(b*y))/a;
		if(x==-0.0000){
			x=0.0000;
		}
		if(y==-0.000){
			y=0.0000;
		}	
		printf("%.3f %.3f\n",x,y);
	}
	return 0;
}

C++: #include<iostream>
#include<iomanip>
using namespace std;

int main(){
    int a,b,c,d,e,f;
    while( cin >> a >> b >> c >> d >> e >> f){
        double mom = a*e - b*d;
        double x = (e*c - b*f)/mom;
        double y = (-c*d + a*f)/mom;
        cout << fixed;
        cout << setprecision(3);
        if (x==0){
            x = 0;
        }
        if (y==0){
            y = 0;
        }
        cout << x << " "<< y << endl;
    }
    //double x = 0.51235;
    //cout << fixed;
    //cout << setprecision(2);
    //cout << x << endl;
}

C++: #include <iostream>
#include <iomanip>
#include <sstream>
#include <vector>

using namespace std;

int main() {
	double a, b, c, d, e, f;

	vector<string> v;
	while (cin >> a >> b >> c >> d >> e >> f) {
		double x, y;

		x = ((c * e) - (b * f)) / ((a * e) - (b * d));
		y = ((c * d) - (a * f)) / ((b * d) - (a * e));

		x = x * 1000;
		x = round(x);
		x = x / 1000;

		y = y * 1000;
		y = round(y);
		y = y / 1000;

		stringstream ss;
		ss << fixed << setprecision(3) << x << " " << y;
		v.push_back(ss.str());
	}
	
	for (int i = 0; i < v.size(); i++) {
		cout << v[i] << endl;
	}

	return 0;
}

C++: #include<stdio.h>
int main(){
	double a,b,c,d,e,f,x,y;
	while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=-1){
		x=((c*e-f*b)/(a*e-d*b));
		y=((c-a*x)/b);
		if(x>0)x+=0.0005;
		else x-=0.0005;
		if(y>0)x+=0.0005;
		else y=-0.0005;
		printf("%.3ld %.3ld",x,y);
	}
	return 0;
}

C++: #include <iostream>
#include <stdio.h>
using namespace std;
 
int main() {
	double a,b,c,d,e,f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		// ???????????????(???????????????????????????????????????)
		// ?¬¬?????????x????????°???1?????????
		b /= a;
		c /= a;
		a = 1;
		// ????????¶?????§???????¨???? (e-bd)y = f-cd ?????????????????????
		double y = (f - c*d) / (e - b*d);
		double x = c - b * y;
		printf ("%1.3f %1.3f",x,y);
		cout << endl;
	}
	return 0;
}

C++: #include <cstdio>
using namespace std;
int main()
{
	int a, b, c, d, e, f;
	while (scanf("%d%d%d%d%d%d", &a,&b,&c,&d,&e,&f) != EOF) {
		double x, y;
		int p = b*d - a*e;
		x = (double)(b*f - c*e) / p;
		y = (double)(c*d - a*f) / p;
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}

C++: #include<iostream>
using namespace std;

int main(){
	int a,b,c,d,e,f;
	
	cout<<"ax+by=c"<<endl<<"dx+ef=f"<<endl;
	cout<<"		????§£???x,y??????????????????"<<endl;
	
	cout<<"a b c d e f >>>>";
	cin>>a>>b>>c>>d>>e>>f;
	
	cout<<"x="<<(e*c-b*f)/(a*e-b*d)
		<<"y="<<(-c*d+a*f)/(a*e-b*d)<<endl;
	return 0;
}