Go: package main

import "fmt"

func main() {
	var Xs, Ys []float32
	Xs = make([]float32, 0)
	Ys = make([]float32, 0)
	var cnt 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
		}
		y = (((a * f) - (d * c)) / ((a * e) - (b * d)))
		x = ((c - (b * y)) / a)
		Xs = append(Xs, x)
		Ys = append(Ys, y)
		cnt++
	}
	for i := 0; i < cnt; i++ {
		fmt.Printf("%.3f %.3f\n", Xs[i], Ys[i])
	}
}

C++: #include <stdio.h>
#define EPS 1e-10
int main() {
    int a,b,c,d,e,f,x,sign,sign2;double q,r;while (scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF) {
        x=a*e-b*d;if (x<0) sign=-1,x=-x; else sign=1;
        q=(c*e-f*b);if (q<0.00) sign2=-1,q=-q; else sign2=1;q=(q*sign*sign2)/(x+0.00);
        r=(a*f-c*d);if (r<0.00) sign2=-1,r=-r; else sign2=1;r=(r*sign*sign2)/(x+0.00);
        if (r<EPS && r>-EPS) r=0.00;if (q<EPS && q>-EPS) q=0.00;
        printf("%.3lf %.3lf\n",q,r);
    }
return 0;}

C++: #include <iostream>
#include <cstdio>
using namespace std;
double Round(double x);

int main(void){
    

    
    while(1){

        //??\?????????
        int a = 0;
        int b = 0;
        int c = 0;
        int d = 0;
        int e = 0;
        int f = 0;
        
        int ret = scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f);
        
        if(ret == EOF){
            break;
        }
        //?¨????
        double x = ( ( ( d * c ) - ( a * f ) ) / ( ( b * d ) - ( a * e ) ) );
        double y = ( ( ( b * d ) - ( a * c ) ) / ( ( d * c ) - ( a * f ) ) );    
        
        //?????¨?????\
        x = Round( x );
        y = Round( y );
        
        //??????
        printf("%.4f %.4f",x,y);
        
    }
    return(0);
}

double Round(double ReciveNum){
    
    double Section = (( ReciveNum * 1000 ) - (( int )( ReciveNum * 1000 )));
    
    if( Section < 0.0005){
        /* Do nothing */
    }else{
        ReciveNum += 0.001;
    }
    
    return ( ReciveNum );
}

C++: const int tt = 10000;

#include<iostream>
#include<string>
#include<sstream>
using namespace std;

string toStr(int n);
string intToString(int n);

int main() {
  int a, b, c, d, e, f;
  
  while(cin >> a >> b >> c >> d >> e >> f) {
    c = c * tt;
    f = f * tt;

    int det = a * e - b * d;

    int x = ( e * c - b * f) / det;
    int y = (-d * c + a * f) / det;
//    cout << x << y << endl;

    cout << toStr(x) << " " << toStr(y) << endl;
  }
}

string toStr(int n) {
  string pm, val;
  
  if (n < 0) {
    pm = "-";
    n = -n;
  } else {
    pm = "";
  }

  int ipart = n / tt;
  int fpart = (n - ipart * tt) + tt + 5;

  val = pm + intToString(ipart) + "." + intToString(fpart).substr(1, 3);
  return val;
}

string intToString(int n) {
  stringstream ss;
  ss << n;
  return ss.str();
}

C++: #include <iostream>
using namespace std;
int main(){
	double a,b,c,d,e,f,g;
	while(cin>>a>>b>>c>>d>>e>>f){
		g = a*e - b*d;
		printf("%.3f %.3f",(c*e-b*f)/g,(a*f-c*d)/g);
	}
}

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

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

int main()
{
  double a,b,c,d,e,f;
  double x=-1001,y=-1001;
  while(cin >> a >> b >> c >> d >> e >> f){
    for(double i=-1000;i<=1000;i=i+0.0001){
      for(double j=-1000;j<=1000;j=j+0.0001){
	if(a*i+b*j==c && d*i+e*j==f){
	  x=i;
	  y=j;
	}
      }
    }
      printf("%.3lf",x);
      cout << " ";
      printf("%.3lf",y);
      cout << endl;
  }
  return 0;
}

C++: #include <iostream>

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

    while (std::cin >> a >> b >> c >> d >> e >> f) {
        auto x = (c*e - b*f)/(a*e - b*d);
        auto y = (c*d - a*f)/(b*d - a*e);
        printf ("%.3f %.3f\n",
                x == -0. ? 0.0 : x,
                y == -0. ? 0.0 : y);
    }

    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;
    }
    break
    return 0;
}

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

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

	while (cin >> a >> b >> c >> d >> e >> f) {
		x = (c / b - f / e) / (a / b - d / e);
		if (0 <= x) { x *= -1; }
		y = (c - a * x) / b;

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

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

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

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

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

C++: #include <iostream>
#include <iomanip>
#include <list>
#include <map>
#include <algorithm>
#include <stack>

using namespace std;

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

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

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

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

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <list>
#include <algorithm>
#include <cmath>
#include <stack>
#include <set>
using namespace std;

#define REP(i,n) for(int (i)=0; (i)<(n); (i)++)
#define FOR(i,a,b) for(int (i)=(a); (i)<(b); (i)++)
#define PUSH(n,v) for(int i=0; i<(n); i++) {int j; cin >> j; v.push_back(j);}
#define ALL(v) v.begin(), v.end()

typedef pair<double, double> XY;

XY solve(double a, double b, double c, double d, double e, double f) {
    double x, y;
    x = (c*e - b*f)/(a*e - b*d);
    y = (a*f - c*d)/(a*e - b*d);
    return make_pair(x,y);
}

int main() {
    double a,b,c,d,e,f;
    while(cin >> a >> b >> c >> d >> e >> f) {
        double x, y;
        XY xy = solve(a,b,c,d,e,f);
        x = xy.first;
        y = xy.second;
        printf("%.3f %.3f\n", round(1000 * x)/1000. + 0.00001, round(1000 * y)/1000. + 0.00001);
    }
    return 0;
}