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("%.3f %.3f\n", x, y)
        }
}

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

int main()
{
	double x, y;
	double a, b, c, d, e, f;
	
	while(scanf("%lf", &a) != EOF)
	{
		cin >> b >> c >> d >> e >> f;
		
	x = (c * e - b * f) / (a * e - b * d);
	y = (a * f - c * d) / (a * e - b * d);
	
	cout << setprecision(3);
	cout << setiosflags(ios::fixed);

	cout << x << " " << y << endl;
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

int main( void ) {
    double a, b, c, d, e, f;
    while(cin >> a >> b >> c >> d >> e >> f) {
        double y = ((c*d - a*f) / (b*d - a*e));
        double x = ((c*e - f*b) / (a*e - b*d));
        printf("%.3lf, %.3lf\n", x, y);
    }
    return 0;
}

C++: 
using namespace std;
#define j bai;
int main() {
	double a, b, c, d, e, y, x, f, bai;
	bool bo = false;
	while (cin >> a >> b >> c >> d >> e >> f) {
		if (a ==0 || b ==0) {
			if (a) {
				y = c / b;
				x = f / d - e*y;
			}
			else if (b) {
				x = a / c;
				y = f / e - d*x;
			}
			bo = true;
		}
		else if (d == 0 || e == 0) {
			if (d) {
				y = f / e;
				x = c / a - d*y;
			}
			else if (e) {
				x = f / d;
				y = f / e - d*x;
			}
			bo = true;
		}
		
		else if (a < d) {
			bai = d / a;
			a *= j;
			b *= j;
			c *= j;
		}
		else {
			bai = a / d;
			d *= j;
			e *= j;
			f *= j;
		}
		if (((a > 0 && d < 0) || (a < 0 && d>0)) && bo==false) {
			y = (c + f) / (b + e);
			x = (c - b*y) / a;
		}
		else if (bo == false) {
			y = (c - f) / (b - e);
			x = (c - b*y) / a;
		}
		if (x == -0.000) {
			x = abs(x);
		}
		if (y == -0.000) {
			y = abs(y);
		}
		printf("%.3lf %.3lf\n", x, y);
	}
	return 0;
}

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

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

	while (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF){
		double y = (d * c - a * f) / (d * b - a * e);
		double x = (f - e * y) / d;
		if (fabs(x) > 1e-4) x = 0.0;
		printf("%.3f %.3f\n", x, y);
	}

	return 0;
}

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

int main()
{
	double a[6], x, y;

	while(cin>>a[0]){
		for(int i = 1; i < 6; i++){
			cin>>a[i];
		}
		y = (a[2]*a[3]-a[0]*a[5])/(a[1]*a[3]-a[0]*a[4]);
		x = (a[2]-a[1]*y)/a[0];

		x = ((double)((int)(x*1000+0.5)))/1000;
		y = ((double)((int)(y*1000+0.5)))/1000;

		printf("%.03f %.03f", x, y);
	}
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <set>
#include <vector>
#include <cstring>
#include <climits>
#include <queue>
using namespace std;

#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define EPS 1e-9

int main(){
	int a,b,c,d,e,f;
	while(~scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f)){
		double x = (c*e - b*f) / (a*e - b*d) ;
		double y = (a*f - d*c) / (a*e - d*b) ; 
		printf("%.3lf %.3lf\n",x+EPS,y+EPS);
	}
	return 0;
}

C++: #include <stdio.h>
#include <math.h>

#define DEBUG

#ifndef DEBUG 
#define fprintf (void)
#endif 

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

	while(scanf("%lf",&a)!=EOF){
		scanf("%lf",&b);
		scanf("%lf",&c);
		scanf("%lf",&d);
		scanf("%lf",&e);
		scanf("%lf",&f);
		
		div=b*d-a*e;
		x=(b*f-c*e)/div;
		y=(c*d-a*f)/div;
		
		x=round(x);
		y=round(y);
		
		printf("%lf %lf\n",x,y);
	}
	
	return 0;
}

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

C++: #include <iostream>
#include <iomanip>
using namespace std;
int main() {
    double a,b,c,d,e,f;
    double x, y;
    while (cin>>a>>b>>c>>d>>e>>f) {
        x = (c-(f-(d/a)*c)/(e-(d/a)*b)*b)/a;
        y = (f-(d/a)*c)/(e-(d/a)*b);
        cout << fixed << setprecision(3) << x << " " << y << endl;
    }
}

C++: //
//  main.cpp
//  Sample
//
//  Created by h3037183 on 2017/07/31.
//  Copyright ?? 2017??´ ?°????. All rights reserved.
//

#include <iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
    double a,b,c,d,e,f,x,y;
    cin>>a>>b>>c>>d>>e>>f;
    x=(c*e-b*f)/(a*e-b*d);
    y=(c*d-f*a)/(b*d-a*e);
    if(x==0)x=0;
    if(y==0)y=0;
    printf("%.3lf %.3lf",x,y);
    cout<<endl;
    return 0;
}

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

int main(){
    double a[3],b[3];
    double x=0,y=0;
    while(cin >> a[0] >> a[1] >> a[2] >> b[0] >> b[1] >> b[2]){
        x = (b[1]*a[2] - a[1]*b[2])/(a[0]*b[1] - a[1]*b[0]);
        y = (a[0]*b[2] - a[2]*b[0])/(a[0]*b[1] - a[1]*b[0]);
        cout << fixed << setprecision(3) <<  x << " " << y << endl;
    }
}

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

int main() {
	int a, b, c, d, e, f;
	std::vector<int> x_vector;
	std::vector<int> y_vector;
	//int cnt = 0;
	
	while (cin >> a >> b >> c >> d >> e >> f) {

	//???????????°
		/*
	while (!cnt) {
		cnt++;
		cin >> a >> b >> c >> d >> e >> f;
		*/
	//end ???????????°

		int x = (b * f - c * e) / (b * d - a * e);	//?????¶???????????£??????
		int y = (c * d - a * f) / (b * d - a * e);		//?????¶???????????£??????

		x_vector.push_back(x);
		y_vector.push_back(y);
	}

	for (int i = 0; i < x_vector.size(); i++) {
		cout << x_vector[i] << " " <<  y_vector[i] << endl;
	}

	//while (1);

	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;
        
        printf("%.03lf %.03lf\n",x,y);
    }
    
    return 0;
}

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

int main(){
double a,b,j,d,e,f,a_,b_,c_,d_,e_,f_;
double x,y;
double in;
while (std::cin >>a>>b>>c>>d>>e>>f){
in = (a*e - b*d);
a_ = a/in;
b_ = -1*d/in;
d = -1*b/in;
e_ = e/in;
x = c * a_ + f*b_;
y = c*d_ + f*e_;
std::cout << std::setprecision(3) << x << ' ' << std::setprecision(3) << y << std::endl;
}
    return 0;
}

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

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

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