Go: package main

import (
  "fmt"
)

func main() {
  var a,b,c,d,e,f float64
  var x,y float64
  for _, err := fmt.Scan(&a, &b, &c, &d, &e, &f); err == nil;
   _, err = fmt.Scan(&a, &b, &c, &d, &e, &f) {
    y = (a*f-c*d)/(a*e-b*d)
    x = (c-b*y)/a
    fmt.Printf("%.3f %.3f\n", x,y)
  }
}

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

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

using namespace std;

int main(void){
    int a,b,c,d,e,f;
    double ansX,ansY;
    while(std::cin >> a >> b >> c >> d >> e >> f){
        ansX = (c*e - b*f) / (a*e - b*d);
        ansX *= 1000;
        if(ansX > 0) ansX += 0.5;
        else ansX -= 0.5;
        ansX = int(ansX);
        ansX /= 1000;
        
        ansY = (a*f - c*d) / (a*e - b*d);
        ansY *= 1000;
        if(ansY > 0) ansY += 0.5;
        else ansY -= 0.5;
        ansY = int(ansY);
        ansY /= 1000;
        
        std::cout <<fixed << setprecision(3) << ansX << " " << fixed << setprecision(3)<<ansY << std::endl;
    }
}

C++: #include <iostream>
#include <cstdio>
using namespace std; 
int main()
{
double a,b,c,d,e,f;
while(cin>>a>>b>>c>>d>>e>>f)
{
printf("%.3f %.3f\n", round((1.0 * b*f - c*e)/(b*d - a*e) * 1000) / 1000, round((1.0 * a*f - c*d)/(a*e - b*d) * 1000) / 1000);
}
return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(12);
  double a, b, c, d, e, f, x, y;
  while (cin >> a >> b >> c >> d >> e >> f) {
    x = (c * e - b * f) / (a * e - d * b);
    y = (a * f - c * d) / (a * e - b * d);
    if (!x) x = 0;
    if (!y) y = 0;
    cout << x << ' ' << y << '\n';
  }
  return 0;
}

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

using namespace std;

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

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

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

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;
    for(;;){
    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);
    printf("%.3lf %.3lf",x,y);
    cout<<endl;
    }
    return 0;
}

C++: #include<iostream>
#include<iomanip>
#include<string>
#include<vector>
#include<set>
#include<algorithm>
#include<map>
#include<cmath>

using namespace std;

int main()
{
	double a,b,c,d,e,f;
	while(cin>>a>>b>>c>>d>>e>>f)
	{
		cout<<fixed<<setprecision(3)<<(double)((c*e-b*f)*1.0)/((a*e-b*d)*1.0)<<' ';
		cout<<fixed<<setprecision(3)<<(double)((c*d-a*f)*1.0)/((b*d-a*e)*1.0)<<endl;
	}

	return 0;
}

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

C++: //#define __USE_MINGW_ANSI_STDIO 0
#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef pair<int, int> PII;

#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#define IN(a, b, x) (a<=x&&x<b)
#define MP make_pair
#define PB push_back
#define MOD 1000000007
#define INF (1LL<<30)
#define LLINF (1LL<<60)
#define PI 3.14159265359
#define EPS 1e-12
//#define int ll

signed main(void)
{
	double a, b, c, d, e, f;
	while(cin >> a >> b >> c >> d >> e >> f) {
		//cout << c*e-b*f << " " << a*e-b*d << " " << c*d-a*f << " " << b*d-a*e << endl;
		if(c*e==b*f) cout << fixed << setprecision(3) << 0 << " ";
		else cout << fixed << setprecision(3) << (c*e-b*f)/(a*e-b*d) << " ";
		if(c*d==a*f) cout << fixed << setprecision(3) << 0 << " ";
		else cout << fixed << setprecision(3) << (c*d-a*f)/(b*d-a*e) << endl;
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

double Round4(double r){
    r=(int)round(r*1000);
    r=(double)r/1000;
    return(r);
}

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

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

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

int main(void)
{
	double a,b,c,d,e,f;
	double ans[2];

	cin >> a >> b >> c >> d >> e >> f;

	ans[1] = (c*d-a*f)/(b*d-a*e);
	ans[0] = (c*d-b*d*ans[1])/(a*d);

	if(ans[1] < 0.0005)
		ans[1] *= -1;
	if(ans[0] < 0.0005)
		ans[0] *= -1;

	printf("%.3lf %.3lf\n", ans[0],ans[1]);

	return 0;
}

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

void OutputSolution(int a, int b, int c, int d, int e, int f)
{
	int B = b;
	a *= e;
	b *= e;
	c *= e;
	d *= B;
	e *= B;
	f *= B;
	double x = (c-f) / (a-d);
	double y = (c-a*x) / b;
	cout << x << ' ' << y << endl;
}

int main()
{
	while(true){
		int a, b, c, d, e, f;
		cin >> a >> b >> c >> d >> e >> f;
		if(cin.eof()) break;
		OutputSolution(a, b, c, d, e, f);
	}
	return 0;
}

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

using namespace std;

double EPS = 1e-9;

int gcd(int a, int b) { return b != 0 ? gcd(b, a%b) : a; }

int main() {
	double a, b, c, d, e, f;
	
	while (cin >> a >> b >> c >> d >> e >> f) {
		double x, y;
		
		int div1 = gcd(a, b), div2 = gcd(b, d);
		int div = gcd(div1, div2);
		a /= div; b /= div; c /= div;
		
		div1 = gcd(d, e); div2 = gcd(e, f);
		div = gcd(div1, div2);
		d /= div; e /= div; f /= div;
		
		y = (c - a*f/d)/(b - a*e/d);
		if (fabs(y) < -EPS) y = 0.0;
		
		x = (c - b*y)/a;
		if (fabs(x) < EPS) x = 0.0;
		
		printf("%.3lf %.3lf\n", x, y);
	}
	
	return 0;
}

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

int main()
{
	double a, b, c, d, e, f;
	while (std::cin >> a >> b >> c >> d >> e >> f) {
		double const denominator = a * e - b * d;
		long long const x1000 = ((c * e - b * f) / denominator + 0.0005) * 1000;
		long long const y1000 = ((a * f - c * d) / denominator + 0.0005) * 1000;
		std::cout.setf(std::ios::fixed);
		std::cout.precision(3);
		std::cout << std::showpoint
				  << x1000 / 1000.0 << ' ' << y1000 / 1000.0 << std::endl;
	}
	return 0;
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main() {
	double a, b, c, d, e, f, x, y;
	while (!cin.eof()) {
		cin >> a >> b >> c >> d >> e >> f;
		double bd = b*d;
		double ea = e*a;
		double cd = c*d;
		double fa = f*a;
		y = (cd - fa) / (bd - ea);
		x = (c - b*y) / a;
		printf("%.3f %.3f\n", x, y);
	}
}

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