Go: package main

import (
	"fmt"
)

func main() {
	for {
		var a, b, c, d, e, f float64
		i, _ := fmt.Scan(&a, &b, &c, &d, &e, &f)
		if i == 0 {
			break
		}

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

		fmt.Printf("%.3f %.3f\n", x, y)
	}
}

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

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

  while(std::cin >>a>>b>>c>>d>>e>>f){

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

  }
}

C++: #include <iostream>
#include <iomanip>
using namespace std;
 
int main()
{
      double a,b,c,d,e,f;
 
      while(cin >> a >> b >> c >> d >> e >> f)
      {
            a = a * d / a;
            b = b * d / a;
            c = c * d / a;
 
            d = d - a;           // d = 0
            e = e - b;
            f = f - c;
 
            e = e * b / e;
            f = f * b / e;
 
            b = b - e;            // b = 0
            c = c - f;
 
            a = a / a;
            c = c / a;            // x = c
 
            e = e / e;
            f = f / e;            // y = f
 
            cout << fixed << setprecision(3) << c << " " << fixed << setprecision(3) << f << 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;
    while(cin>>a>>b>>c>>d>>e>>f){
    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 <cstdio>

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

  while (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF) {
    int div = a;
    a /= div, b /= div, c /= div;

    int time = -d;
    d += a * time, e += b * time, f += c * time;

    double y = f / e;
    double x = c - b * y;

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

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


using namespace std;

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

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

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

	
	while (~scanf( "%d%d%d%d%d%d" ,&a,&b,&c,&d,&e,&f) )
	
	{
		double y=(double)(c*d-a*f)/(double)(b*d-a*e);
		if(a!=0)
		
		printf("%.3f %.3f\n",(c-b*y)/a,y);
		else
		printf("%.3f %.3f\n",(f-e*y)/d,y);
	}

    return 0;
    
    }

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

using namespace std;

int main()
{
    double a, b, c, d, e, f;
    double answer1, answer2;

    while (cin >> a >> b >> c >> d >> e >> f) {
        answer1 = round((e * c - b * f) / (a * e - b * d) * 1000) / 1000;
        answer2 = round((-d * c + a * f) / (a * e - b * d) * 1000) / 1000;
        if (answer1 == 0) answer1 = 0.000;
        if (answer2 == 0) answer2 = 0.000;
        cout << fixed << setprecision(3) << answer1<< " " << answer2 << endl;
    }
    
    return 0;
}

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

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

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

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

        if (x == 0) {
            x = 0;
        }
        else if (y == 0) {
            y = 0;
        }
        
        printf("%.3f %.3f\n", x, y);
        
        
	}
    
    
	return 0;
}

C++: #include <stdio.h>
#pragma warning(disable : 4996)
long 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)) {
		x = (c * e - b * f) / (a * e - b * d);
		y = (a * f - c * d) / (a * e - b * d);
		if (-0.0005 < x && x < 0.0005) x = 0.0;
		if (-0.0005 < y && y < 0.0005) y = 0.0;
		printf("%.3Lf %.3Lf\n", x, y);
	}
	return 0;
}

C++: #include <iostream>
#include<string>
#include<cmath>
#include<algorithm>
#include<cctype>
#include<queue>
#include<stack>
#include<stdio.h>
#include<vector>
#include<set>
#include<map>
#include<iomanip>
#define rep(i,n) for(int i=0;i<n;i++)
typedef int long long ll;

using namespace std;
int main(){

    double a,b,c,d,e,f;
    
    while(cin>>a){
        cin>>b>>c>>d>>e>>f;
        double h=a*e-b*d;
        double xx=(c*e-f*b);
        double yy=(a*f-c*d);
        
        //double ue=a*c+b*f;
        //double st=d*c+e*f;
        
        double x=xx/h;
        double y=yy/h;
        printf("%.3f %.3f \n",x,y);
       
    }
return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
 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)
  {
  	 y=(c*d-f*a)/(b*d-e*a); x=(c-b*y)/a; 
 	  printf("%.3f %.3f\n",x,y);
  }
   return 0;
 }

C++: #include <iostream>
#include <iomanip>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;

int main() {
    int a[3];
    int b[3];
    int y[3];
    int x[3];
    while(true) {
    REP(i,3)
        cin >> a[i];
    REP(i,3)
        cin >> b[i];
    if(!cin)
        return 0;
    REP(i,3) 
        y[i] = b[i]*a[0] - a[i]*b[0];
    REP(i,3)
        x[i] = b[i]*y[1] - y[i]*b[1];
    double o[2];
    o[0] = x[2]/double(x[0]);
    o[1] = y[2]/double(y[1]);
    REP(i,2)
        o[i] = (o[i]==0)?0:o[i];
    cout << fixed << setprecision(3) << o[0] << ' ';
    cout << fixed << setprecision(3) << o[1] << '\n';
    }
}

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

using namespace std;

double roundOff(double);
int main(void){
	for(int a, b, c, d, e, f; cin >> a >> b >> c >> d >> e >> f;){
		double delta = a * e - b * d;
		double x = roundOff((c * e - b * f) / delta);
		double y = roundOff((a * f - c * d) / delta);

		cout.setf(ios::showpoint);
		cout << setprecision(3) << x << " " << y << endl;
	}
	return 0;
}

double roundOff(double a){
	a*=1000;
	a = int(a + 0.5 - (a < 0));
	a/=1000.;
	return a;
}

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

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

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

	return 0;
}

C++: #include <cmath>
#include <ctime>
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <bitset>
#include <functional>
#include <numeric>
#include <utility>
#include <iomanip>
#include <cstdio>
#include <cctype>
#include <queue>
#include <complex>
#include <climits>

typedef long long ll;

using namespace std;

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

		cout<< setprecision(3) << setiosflags(ios::fixed) << x << " " << y << endl;
	}

	return 0;
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
int main(void){
	
	double x, y;
	int a, b, p;
	int c, d, q;

	while (cin >> a >> b >> p >> c >> d >> q){

		x = (double)((p * d - b * q) / (a * d - b * c));
		y = (double)((a * q - p * c) / (a * d - b * c));

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