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<algorithm>
#include<cmath>
using namespace std;

int main(){
	double a,b,c,d,e,f;
	while(cin>>a>>b>>c>>d>>e>>f){
		double det = a*e-b*d;
		double x = 1/det*(c*e - b*f);
		double y = 1/det*(-c*d + a*f);	
        if(x == -0.0) x=0;
        if(y == -0.0) y=0;

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

C++: // 20151005
// ??????????????\????????¶?????????




#include<stdio.h>




int main() {
  double a, b, c; // ??? 1 ????????°
  double d, e, f; // ??? 2 ????????°




  /* ??\??? */
  while ((scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f)) != EOF) {
    /** ??¶?´??????? **/
    if (a < -1000 && a > 1000) break;
    if (b < -1000 && b > 1000) break;
    if (c < -1000 && c > 1000) break;
    if (d < -1000 && d > 1000) break;
    if (e < -1000 && e > 1000) break;
    if (f < -1000 && f > 1000) break;
    /*** ??????????????? ***/
    /**** (1, 1) ??? 1 ??? ****/
    b = b / a;
    c = c / a;
    a = a / a; // ????????????
    /* printf("--------------------------\n"); */
    /* printf("%f %f %f\n", a, b, c); */
    /* printf("%f %f %f\n", d, e, f); */
    /***** (2, 1) ??? 0 ???*****/
    e = e - b * d;
    f = f - c * d;
    d = d - a * d; // ????????????
    /* printf("--------------------------\n"); */
    /* printf("%f %f %f\n", a, b, c); */
    /* printf("%f %f %f\n", d, e, f); */




    /**** (2, 2) ??? 1 ??? ****/
    d = d / e;
    f = f / e;
    e = e / e; // ????????????
    /* printf("--------------------------\n"); */
    /* printf("%f %f %f\n", a, b, c); */
    /* printf("%f %f %f\n", d, e, f); */
    /***** (1, 2) ??? 0 ???*****/
    a = a - d * b;
    c = c - f * b;
    b = b - e * b; // ????????????
    /* printf("--------------------------\n"); */
    /* printf("%f %f %f\n", a, b, c); */
    /* printf("%f %f %f\n", d, e, f); */




    /* ??¨??? */
    printf("%0.3f %0.3f", c, f);
  }
			



  /* ?????? */
  return 0;
}

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

int main() {
	double x,y,a,b,c,d,e,f;
	while(6 == scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)){
		x = (-b*f+e*c)/(a*e-b*d);
		y = (f-d*x)/e;
		if(x == 0){
        	x = 0.000;
	    }
		if(y == 0){
        	y = 0.000;
		}

		printf("%.3lf %.3lf\n",x,y);
	}
	return 0;
}

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

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

using namespace std;

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

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

C++: #include <math.h>
#include <iostream>
#include <ios>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <string>

#define YES "YES"
#define NO "NO"
#define space ' '

using namespace std;

void func();

int main(void)
{
	
	func();

	return 0;
}

// using matrix	?????????????????´??????
void func()
{
	int a, b, c, d, e, f;
	double x, y;

	while (cin >> a >> b >> c >> d >> e >> f, !cin.eof()){


		if ((a*e - d*b) == 0)
		{
			cout << 0 << space << 0 << endl;
		}
		else
		{
			x = (e*c - b*f) / (a*e - d*b);
			y = (-d*c + a*f) / (a*e - d*b);

			cout << fixed << setprecision(3);
			cout << x*0.0005 << space << y+0.0005 << endl;
			cout << dec;
		}
	}
}

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

C++: #include<iostream>

using namespace std;

int main(void)
{
	double a,b,c;
	double d,e,f;
	double delta;
	double delta_one;
	double delta_two;
	double x,y;
	
	while( scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) != EOF)
	{
		delta = (a*e) -(b*d);
		delta_one  = (c*e) - (f*b);
		delta_two = (a*f) - (c*d);
		x = delta_one/delta;
		y = delta_two/delta;
		x = x * 1000;
		y = y * 1000;
		x = (int)x;
		y = (int)y;
		x = x/1000;
		y = y/1000;

		printf("%0.3lf %0.3lf\n",x,y);	
	}
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <cmath>
 
using namespace std;

static int N = 2;
int pivot;


int main(){
    int i, j, k, n;
  
    // ?????§?????°?????? M
    double M[N][N + 1];
    for (int i = 0; i < N; ++i){
        for(int j= 0; j < N+1; ++j){
            cin >> M[i][j];
        }
    }
    
  

 
    double pivot, mul;
 
    // ????§??????????1??§??£????????????????????????????????????(???????¶????)
    for (i = 0; i < N; ++i){
        // ????§??????????????????????????????§??????????????£??????
        pivot = M[i][i];
        for (j = 0; j < N + 1; ++j){
           M[i][j] = (1 / pivot) * M[i][j];
        }
 
    // ???????????????????????????????????¨?????????????????????????????????
    // i??????????????????0???????????????????????¬?????¢?????????
         for (k = i + 1; k < N; ++k){
            mul = M[k][i];
            for (n = i; n < N + 1; ++n){
                M[k][n] = M[k][n] -  mul * M[i][n];
            }
        }
    }
 
    // ???????????????????????£????????°?????£??\???????????¬??????????§£?????¢?????????(????????£??\)
    // ????????¨??????????????????????????§?????¬??????????§£???????????????
    for (i = N - 1; i > 0; --i){
        for (k = i - 1; k >= 0; --k){
            mul = M[k][i];
            for (n = i; n < N + 1; ++n){    
                M[k][n] = M[k][n] - mul * M[i][n];
            }
        }
    }
    cout << M[0][2] << " " << M[1][2] << endl; 
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main(){
	float a,b,c,d,e,f,x,y;
	while(cin>>a){
	cin>>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("%.3f %.3f",x,y);
	cout<<endl;
	}
	return 0;
	}