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>
using namespace std;
int main(){
double a,b,c,d,e,f;
double x,y;
while(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("%.3f %.3f\n",x,y);
 }
}

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)<< std::showpoint << x << ' ' << std::fixed << std::setprecision(3)<<std::showpoint << y << std::endl;
	}

	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*e-b*f)/(a*e-b*d);
		y=(a*f-c*d)/(a*e-b*d);
		cout<<setiosflags(ios::fixed);
		cout<<setprecision(3)<<x<<" "<<setprecision(3)<<y<<endl;
	}
	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <math.h>
using namespace std;
int main(){
	double a, b, c, d, p, q;
	double x, y;
	while(cin >> a >> b >> p >> c >> d >> q){
		x = (d*p - b*q)/(a*d - b*c);
		y = (c*(-p) + a*q)/(a*d - b*c); //条件より?≠0
		x = floor(100*(x + 0.005)) / 100; 
		y = floor(100*(y + 0.005)) / 100; //四捨五入
		cout << setprecision(3) << fixed << x << " " << y << endl;
	}
	return(0);
}

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

using namespace std;

int main(void){
	double in;
	while(cin >> in){
		double a,b,c,d,p,q;
		double delta;
		double x,y;
		a = in;
		cin >> b;
		cin >> p;
		cin >> c;
		cin >> d;
		cin >> q;
		delta = a*d-b*c;
		x = (d*p-b*q)/delta;
		y = (-c*p+a*q)/delta;
		cout << showpoint << setprecision(4);//小数点以下4桁
		cout << (double)x << " " << (double)y << "\n";
	}
	return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define MOD 1000000007 //10^9+7
#define INF 1000000000 //10^9

pair<double, double>equ2(int a,int b,int c,int d,int e,int f){
    double det=1.0/(a*e-b*d);
    double x=(double)(c*e-b*f)*det;
    double y=(double)(a*f-c*d)*det;
    if (x==-0) x=0;if (y==-0) y=0;
    return pair<double, double>(x,y);
}

int main ()
{
    string str;
    while (!cin.eof()) {
        int a,b,c,d,e,f;
        
        cin>>a>>b>>c>>d>>e>>f;
        
        pair<double,double> ans=equ2(a,b,c,d,e,f);
        
        cout<<ans.first<<' '<<ans.second<<endl;
    }
}

C++: #include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<string>
#include<functional>
#include<queue>
#include<math.h>
#define INF 999999

using namespace std;


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

	vector<pair<double,double>> ans;
	while (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);
		if (x == 0)x = 0;
		if (y == 0)y = 0;
		ans.push_back(make_pair(x, y));

	}

	for (int i = 0; i < ans.size(); i++) {
		printf("%.3f %.3f\n", ans[i].first, ans[i].second);
	}

	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <stdio.h>

using namespace std;

int main()
{
	double a,b,c,d,e,f,x,y;
	double ex;
	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);

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

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

}

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

#define REP(i, a) for(int i=0;i<(int)a;++i)
using namespace std;

void solver() {
    double a, b, c, d, e, f;
    while (cin >> a >> b >> c >> d >> e >> f) {
        auto y = (c / a - f / d) / (b / a - e / d);
        auto x = (c / b - f / e) / (a / b - d / e);
        cout << fixed;
        cout << setprecision(3);
        cout << x << " " << y << endl;
    }
}

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

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

int main(void)
{
	// ax+by=c,dx+ey=f => ax+by=c,-(a/d)*dx+-(a/d)*ey=-(a/d)*f => ax+by=c,-ax-aey/d=-af/d => by-aey/d=c-af/d => (b-ae/d)y = c-af/d => y=(c-af/d)/(b-ae/d)
	// ax+by=c, ax=c-by, x=(c-by)/a
	
	signed int a, b, c, d, e, f;
	double x, y;
	
	do
	{
		if(std::cin >> a, !std::cin) break;
		std::cin >> b >> c >> d >> e >> f;
		y = (c-a*f/d)/(b-a*e/d);
		x = (c-b*y)/(double)a;
		printf("-->%d %d %d %d %d %d\n", a, b, c, d, e, f);
		printf("%.3lf %.3lf\n", x, y);
	} while(true);

	return 0;
}

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

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

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

using namespace std;

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

C++: #include "iostream"
using namespace std;

int main()
{
	int a, b, c, d, e, f;
	double kotaemin, min;
	while (cin >> a >> b >> c >> d >> e >> f) {
		double y,x;
		kotaemin = (a*f) - (c*d);
		min = a*e - b*d;
		y = kotaemin / min;
		x = (c - b*y) / a;
	//	y += 0.0005;
		//x += 0.0005;
		printf("%.3f %.3f\n",  x, 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;
    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;
    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-c*d)/(a*e-b*d);
		double x=(c-b*y)/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;
	cin>>a>>b>>c>>d>>e>>f;

	float det = a*e-b*d;
	float x = 1/det*(c*e - b*f);
	float y = 1/det*(-c*d + a*f);

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

	int stop;
	cin >> stop;

	return 0;
}