Go: package main

import "fmt"

func main() {
	var resultX, resultY [100]float32
	var count int
	for {
		var a, b, c, d, e, f, x, y float32
		fmt.Scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)
		if a == 0 {
			break
		}
		//Simultaneous equation
		y = (((a * f) - (d * c)) / ((a * e) - (b * d)))
		x = ((c - (b * y)) / a)
		resultX[count] = x
		resultY[count] = y
		count++
	}
	for i := 0; i < count; i++ {
		fmt.Printf("%.3f %.3f\n", resultX[i], resultY[i])
	}
}

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);
	}
}

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

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

	while (cin >> a) {
		cin >> b;
		cin >> c;
		cin >> d;
		cin >> e;
		cin >> f;
	
		x = (c*e - f*b) / (a*e - d*b);
		y = (c*d - f*a) / (b*d - e*a);

		if (x <= 0.0001 && -0.0001 <= x) {
			x = 0;
		}
		if (y <= 0.0001 && -0.0001 <= y) {
			y = 0;
		}

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

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

		cout << fixed << setprecision(3) << x << " ";
		cout << fixed << setprecision(3) << y << endl;

	}
	return 0;
}

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

double a,b,c,d,e,f;

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

C++: #include<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<iostream>
#include<queue>
#include<map>
#include<set>

using namespace std;

#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)

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 A = b/a-e/d;
		double B = c/a-f/d;
		
		double y = B/A;
		double x = c/a-b/a*y;
		
		
		printf("%lf %lf\n",x,y);
	}
}

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

int main(){
    float a, b, c, d, e, f, x, y, dividedNum1, dividedNum2 = 0;
    while(cin >> a >> b >> c >> d >> e >> f){
        dividedNum1 = a;
        dividedNum2 = d;
        a *= dividedNum2;
        b *= dividedNum2;
        c *= dividedNum2;
        d *= dividedNum1;
        e *= dividedNum1;
        f *= dividedNum1;
        
        float temp1 = b - e;
        float temp2 = c - f;
        
        y = floor((temp2 / temp1) * 1000 + 0.0005) / 1000;
        x = floor((c - (b * y) ) * 1000 + 0.0005) / 1000;
        
        cout << fixed << setprecision(3) << x << " " << fixed << setprecision(3) << y << endl;
    }
    return 0;
}