Go: package main

import "fmt"

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

C++: #include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <complex>
#include <math.h>
#include <ctype.h>
using namespace std;
double a,b,c,d,e,f,x,y;
int main(){
	while(cin>>a>>b>>c>>d>>e>>f){
	x=(c*e-b*f)/(a*e-b*d);
	y=(a*f-c*d)/(a*e-b*d);
	printf("%.3lf", x+1-1);
	cout<<" ";
	printf("%.3lf\n", y+1-1);
	}
return 0;}

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

int main(){
  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=(c*d-a*f)/(b*d-a*e);
    x=round(x*1000)/1000;
    y=round(y*1000)/1000;
    cout << fixed << setprecision(3) << x << " " << setprecision(3) << y << endl;
  }

  return 0;
}

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

using namespace std;

int main(){
        double a, b, c, d, e, f, g, h, i, j, k, l, m, n, x, y;

        while(scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f) != EOF){
                g = a * d;      //公倍数
                j = b;
                k = c;
                l = a;
                b *= g / a;
                c *= g / a;
                e *= g / d;
                f *= g / d;
                a *= g / a;
                d *= g / d;

                h = b - e;
                i = c - f;

                y = i / h;
                x = k - y * j;
                x /= l;
                y *= 1000;
                y = floor(y + 0.5);
                y /= 1000;
                x *= 1000;
                x = floor(x + 0.5);
                x /= 1000;

                printf("%.4f %.4f", x, y);
        }

        return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<string>

#define add push_back
#define inf 2147000000

#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;

int main(void){
	double a,b,c,d,e,f,g,h,i,x,y;
	
	while(scanf("%lf",&a)!=EOF){
		scanf("%lf%lf%lf%lf%lf",&b,&c,&d,&e,&f);
		
		
		g=a/d;
		d*=g;
		e*=g;
		f*=g;
		
		h=b-e;
		i=c-f;
		
		x=i/h;
		h=a;
		i=c-b*x;
		y=i/h;
		
		printf("%.3lf %.3lf\n",y,x);
	}
}

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

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	double a, b, c, d, e, f;
	while(cin >> a >> b >> c >> d >> e >> f){
		double x = (c * e - f * b) / (a * e - d * b);
		double y = (c * d - f * a) / (b * d - a * e);
		//double x = (- b * y + c) / a;
		
		cout << fixed << setprecision(3) << x << " " << y << endl;
	}
	
	return 0;
}

C++: #include <iostream>
#include <iomanip>
using namespace std;
int main() {
int a,b,c,d,e,f;
while (cin>>a>>b>>c>>d>>e>>f) {
 double dx = b*f-c*e;
 double dy = a*f-c*d;
 double d  = a*e-b*d;
 cout << setprecision(4) << dx/d << ' ' << dy/d << endl;
 }
return 0;
}

C++: #include <stdio.h>


void main(void){
	double a=0, b=0, c=0, d=0, e=0, f=0;
	scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f);
	double x = (f*b - e*c) / (d*b - e*a);
	double y = (f*a - d*c) / (e*a - d*b);
	printf("%f %f\n", x, y);
	return;
}

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){

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


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

C++: #include <iostream>
#include <iomanip>
using namespace std;
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    double a, b, c, d, e, f;
    while (cin >> a >> b >> c >> d >> e >> f) {
        double x = (e * c - b * f) / (e * a - b * d);
        double y = (c - a * x) / b;
        cout << fixed << setprecision(3) << x << " " << y << "\n";
    }
}

C++: #include <stdio.h>
int main(void){
    float a,b,c,d,s,t;
    while(~scanf("%f%f%f%f%f%f",&a,&b,&s,&c,&d,&t)){
        printf("%f %f\n",(s*d-b*t)/(a*d-b*c),(a*t-s*c)/(a*d-b*c));
    }
    return 0;
}

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


int main(void){

  int a;
  int b;
  int c;
  int d;
  int e;
  int f;

  float x;
  float y;

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

  x = a * e - b * d ;
  y = b * d - a * e ;

  if ((x == 0) && (y == 0)){
    cerr << "x?????????y??????????????????" << endl;
    exit(1);
  }else if(x == 0){
    cerr << "x??????????????????" << endl;
    exit(1);
  }else if(y == 0){
    cerr << "y??????????????????" << endl;
    exit(1);
  }else{

    if(c * e - b * f == 0){
      x = 0;
    }else{
      x = ( c * e - b * f ) / x ;
    }

    if(c * d - a * f == 0){
      y = 0;
    }else{
      y = ( c * d - a * f) / y;
    }
    
    cout << fixed << setprecision(3) << x << "   " << fixed << setprecision(3) << y << endl;
  }

  return 0;


}

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


int GetDigit(int n){
	int i = 0;

	while(n > 0){
		n /= 10;
		i++;
	}

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

	cout.flags(ios::fixed);
	cout.precision(3);
	
	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);

		if(x == -0.0) x = abs(x);
		if(y == -0.0) y = abs(y);
		cout << x << ' ' << y << endl;
	}

	return 0;
}

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

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

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

    y = (c*d - f*a)/(b*d-e*a);
    x = (b*y - c)/a;
    
    
    x*=10000;
    y*=10000;
    
    x+=0.5;
    y+=0.5;
    
    x/=10000;
    y/=10000;
    
    //cout << x << y << endl;
    printf("%.3f %.3f\n", x, y);
  }

  return 0;
}

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

using namespace std;

vector<string> split(const string &s, char delim) {
    vector<string> elems;
    stringstream ss(s);
    string item;
    while (getline(ss, item, delim)) {
        if (!item.empty()) {
            elems.push_back(item);
        }
    }
    return elems;
}

double calc_y(double a, double b, double c, double d, double e, double f) {
    double y = (((d * c) / a) - f ) / (((d * b) / a) - e );
    return y;
}

int main() {
    string str;
    while(getline(cin, str)) {
        vector<string> splited = split(str, ' ');
        double a = stod(splited[0].c_str());
        double b = stod(splited[1].c_str());
        double c = stod(splited[2].c_str());
        double d = stod(splited[3].c_str());
        double e = stod(splited[4].c_str());
        double f = stod(splited[5].c_str());
        double y = calc_y(a, b, c, d, e, f);
        double x = (c - (b * y)) / a;
        cout <<  fixed << setprecision(3) << x << " " << fixed << setprecision(3)  << y << endl;
    }

    return 0;
}