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 <utility>
#include <iostream>
#include <cmath>
#include <cstdio>

// ax + by = e1
// cx + dy = e2
auto solve (double a , double b , double e1 , double c , double d , double e2) -> std::pair <double , double>
{
    auto delta = a * d - b * c;
    return std::make_pair ((d * e1 - b * e2) / delta , (a * e2 - c * e1) / delta);
}

auto show (double v) -> std::string
{
    char s [100];
    if (-0.0005 < v && v < 0.0005)
    {
        return "0.000";
    }
    std::sprintf (s , "%.3f" , v);
    return s;
}

auto main () -> int
{
    double a , b , c , d , e , f;
    while (std::cin >> a >> b >> c >> d >> e >> f)
    {
        auto xy = solve (a , b , c , d , e , f);
        std::cout << show (xy.first) << ' ' << show (xy.second) << std::endl;
    }
}

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

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

	return 0;
}

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

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

	while(1){
		getline( cin, str );
		if( str.size()==0 ){
			break;
		}
		sscanf( str.c_str(), "%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f );

		double D  = a*e-b*d;
		double D1 = c*e-f*b;
		double D2 = a*f-d*c;
		x = D1 / D;
		y = D2 / D;

		bool isX = ( (c-a*x)/b == (f-d*x)/e );
		bool isY = ( (c-b*y)/a == (f-e*y)/d );
		if( !isX && isY ){
			x = 0.0;
			y = c/b;
		}else if( isX && !isY ){
			y = 0.0;
			x = c/a;
		}else if( !isX && !isY ){
			x = y = 0.0;
		}

		if( x == -0.000 )	x = 0.000;
		if( y == -0.000 )	y = 0.000;

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

	return 0;
}

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

int main(){
  double a1,b1,c1,d1,e1,f1,a2,b2,c2,d2,e2,f2,a3,b3,c3,d3,e3,f3,x,y;

  for(;;){
    cin>>a1>>b1>>c1>>d1>>e1>>f1;

    a2=a1*d1;
    b2=b1*d1;
    c2=c1*d1;

    d2=a1*d1;
    e2=a1*e1;
    f2=a1*f1;

    y=(c2-f2)/(b2-e2);

    a3=a1*e1;
    b3=b1*e1;
    c3=c1*e1;

    d3=b1*d1;
    e3=b1*e1;
    f3=b1*f1;

    x=(c3-f3)/(a3-d3);

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

}

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

int main(){
	int a,b,c,d,e,f;
	while(cin>>a>>b>>c>>d>>e>>f){
		int d1[3]={a,b,c};
		int d2[3]={d,e,f};
		double anx=(c*e-f*b)/(a*e-d*b);
		double any=(c*d-f*a)/(b*d-e*a);
		printf("%.3f ",anx);
		printf("%.3f\n",any);
	}
	return 0;
}

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

int main(){
	double a,b,c,d,e,f;
	while(cin>>a>>b>>c>>d>>e>>f){
		double y=(a*f-d*c)/(a*e-d*b);
		double x=(c-b*y)/a;
		
		cout<<fixed<<setprecision(3)<<x<<" "<<y<<endl;
	}
	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){
        double y = (a*f-c*d)/(a*e-b*d);
        double x = (c-(b*y))/a;
        if(x==0) x=0.000;
        if(y==0) y=0.000;
        printf("%.3lf %.3lf\n",x,y);
    }
    return 0;
}

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

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

#include <iostream>
#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-a*f)/(b*d-a*e);
    cout<<x<<" "<<y<<endl;
    }
    return 0;
}

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

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

C++: 
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <map>
#define pi 3.14159265358979323846264338
using namespace std;

int main() {
	int a, b, c, d, e, f;
	double by, ey, x, y, cc, ff;
	while (cin >> a >> b >> c >> d >> e >> f) {
		by = b*d;
		cc = c*d;
		ey = e*a;
		ff = f*a;
		y = (ff - cc) / (ey - by);
		x = (c - b*y) / a;
		int xx = x * 10000, yy = y * 10000;
		if (xx % 10 >= 5) {
			x += 0.001;
		}
		if (yy % 10 >= 5) {
			y += 0.001;
		}
		cout << fixed << setprecision(3) << x << " " << y << endl;
	}
	return 0;
}

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){
    double delta = a*e - d*b;
    double x = (1/delta)*(e*c+(-b)*f);
    double y = (1/delta)*((-d)*c+a*f);
    //cout << x << " " <<y << endl;
    printf("%4.3f %4.3f\n",x,y);
  }
}

C++: #include <algorithm>
#include <string.h>
#include <stdio.h>

int main()
{
	const double EPS = 1.0e-10;
	double a,b,c,d,e,f;
	double x,y;
	while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF){
		x = (e * c - b * f) / (a * e - b * d);
		y = (a * f - d * c) / (a * e - b * d);
		if(-0.0005 < x && x < 0.0+EPS) x = 0.0;
        if(-0.0005 < y && y < 0.0+EPS) y = 0.0;
		printf("%.3f %.3f\n",x,y);
	}
	return 0;
}

C++: #include <stdio.h>

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 ee = e / b, dd = d / a;
    double ax = a * ee, cx = c * ee;
    printf("%.3f ", (cx - f) / (ax - d) == -0 ? 0 : (cx - f) / (ax - d));
    b *= dd, c *= dd;
    printf("%.3f\n", (c - f) / (b - e) == -0 ? 0 : (c - f) / (b - e));
  }
  return 0;
}

C++: #include<iostream>
#include<stdio.h>
int main(){

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

    scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f);

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

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


      return 0;
    }

C++: #include<bits/stdc++.h>
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*e-b*f)/(a*e-b*d);
    y=(c*d-a*f)/(b*d-a*e);

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

}

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

#define MAX 1000

int main(void){

	float a, b, c, d, e, f;
	float ansx[MAX], ansy[MAX];

	int i = 0;

	while (scanf("%f%f%f%f%f%f%f", &a,&b,&c,&d,&e,&f) != EOF){
		if (a*e != b*d){
			ansx[i] = (c*e - b*f) / (a*e - b*d);
			ansy[i] = (c*d - a*f) / (b*d - a*e);
			if ((int)(ansx[i] * 10000) % 10 > 4){
				ansx[i] += 0.001;
			}
			if ((int)(ansy[i] * 10000) % 10 > 4){
				ansy[i] += 0.001;
			}
		}
		i++;
	}

	for (int j = 0; j < i; j++){
		printf("%.3f %.3f\n", ansx[j], ansy[j]);
	}
	
	return 0;
}

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

int main(){
    double a,b,c,d,e,f,x,y;
    while(cin >> a >> b >> c >> d >> e >> f){
        if(cin.eof()) break;
        x = (c*e-b*f)/(a*e-b*d);
        y = (f*a-c*d)/(a*e-d*b);
        // x += 0.0005;
        // y += 0.0005;
        printf("%.3f %.3f\n",x,y);
    }
}

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

double round_at(double n,int dig){
    return ((int)(round(n*pow(10,dig))))/pow(10,dig);
}

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