Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	var strs []string
	var a, b, c, d, e, f float64
	var x, y float64
	for scanner.Scan() {
		strs = strings.Split(scanner.Text(), " ")
		_a, _ := strconv.Atoi(strs[0])
		_b, _ := strconv.Atoi(strs[1])
		_c, _ := strconv.Atoi(strs[2])
		_d, _ := strconv.Atoi(strs[3])
		_e, _ := strconv.Atoi(strs[4])
		_f, _ := strconv.Atoi(strs[5])
		a = float64(_a)
		b = float64(_b)
		c = float64(_c)
		d = float64(_d)
		e = float64(_e)
		f = float64(_f)
		y = (c*d - f*a) / (d*b - 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, x, y, det;
  while(cin >> a >> b >> c >> d >> e >> f) {
    det = 1.0/(a*e - b*d);
    x = (c*e - b*f)*det;
    y = (a*f - c*d)*det;

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

  return 0;
}

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

using namespace std;
typedef vector<int> vi;
int a,b,c,d,e,f;
int main(){
	while(cin>>a>>b>>c>>d>>e>>f){
		int x=(c*e-b*f)/(a*e-b*d);
		int y=(c*d-a*f)/(b+d-a*e);
		printf("%.3f %.3f",x,y);
	}
  return 0;
}

C++: #include <stdio.h>

int main(){
	int i,j;
	int a,b,c,d,e,f;
	int tmp;
	float x,y;
		
	while(scanf("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f)!=EOF){
		tmp = d;
		d*=a; e*=a; f*=a;
		a*=tmp; b*=tmp; c*=tmp;
		y=(float)((c-f)/(b-e));
		x=(float)((c-b*y)/a);
		if(x==-0.000000){
			x = 0.000000;
		}
		if(y==-0.000000){
			y = 0.000000;
		}
		printf("%0.3f %0.3f\n",x,y);
	}
	
	
	return 0;
}

C++: #include<iostream>

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

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

double sisya(double x)
{
	double a = x;
	if(x < 0)
		a = -x;
			a = a*1000;
	a = a - static_cast<double>(static_cast<int>(a));
	a = a+0.5;
	if(a >= 1.0){
		return x + 0.001;
	}
	return x;
}

int main()
{
	double a,b,c,d,e,f;
	double x,y;
	while (cin >> a && cin >> b && cin >> c && cin >> d && cin >> e && cin >> f){
		x = (f/e - c/b) / (d/e - a/b) ;
		x = sisya(x);
		y = (f/d - c/a) / (e/d - b/a) ;
		y = sisya(y);
		cout << setprecision(3) << fixed << x << " " <<  setprecision(3) << fixed << y << endl;
	}
	return 0;
}

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


using namespace std;


double solveY(int a,int b,int c,int d,int e,int f){
	double ret;
	ret=(double)(a*f-d*c)/(a*e-b*d);
	return ret;
}

int main(){
	while(1){
		int a,b,c,d,e,f;
		if( !(cin>>a>>b>>c>>d>>e>>f) )break;
		double y=solveY(a,b,c,d,e,f);
		double x=(c-b*y)/a;
		printf("%5.3lf %5.3lf\n",x,y);
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
int a,b,c,d,e,f;
float A,B,C,D,E,F,X,Y;
while(cin>>a>>b>>c>>d>>e>>f){
C=c;
B=b;
A=a;
E=e*a/d;
F=f*a/d;
Y=(C-F)/(B-E);
X=(C-B*Y)/A;
cout<<X<<Y<<endl;
}
}

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

C++: 
#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <stack>
#include <cctype>
#include <complex>
#include <vector>
#include <algorithm>

using namespace std;


bool solve(){

	float a,b,c,d,e,f,g;
	while(cin>> a>> b>> c>> d>> e>> f){
		float x = (1.0/(a*e-b*d)) * (e*c - b*f);
		float y = (1.0/(a*e-b*d)) * (-c*d + a*f);
		if(-0.001<x && x<=0) x = 0;
		if(-0.001<y && y<=0) y = 0;
		printf("%.3f %.3f",x, y);
		printf("\n");
	}
	return true;
}

int main(){
	cout.setf(ios::fixed);
	cout.precision(10);
	solve();

	return 0;
}

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

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

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

}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#define rep(x,to) for(x=0;x<to;x++)
#define rep2(x,from,to) for(x=from;x<to;x++)

using namespace std;


int main(void){

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

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

int main(){
	int count = 0;
	double x[100],y[100];
	double a, b, c, d, e, f;
	while(cin >> a >> b >> e >> c >> d >> f){
		x[count] = (e*d-b*f)/(a*d-b*c);
		y[count] = (a*f-e*c)/(a*d-b*c);
		if(x[count] == -0){
			x[count] = 0;
		}
		if(y[count] == -0){
			y[count] = 0;
		}
		count++;
	}
	for(int i = 0; i < count; i++){
		cout << fixed << setprecision(3) << x[i] << " " << y[i] << endl;
	}
}

C++: 
/* vo00_04.cpp */
#include <iostream>
#include <iomanip>
#include <cmath>
#include <cstdio>
using namespace std;

int is_double(double dl);
double m_round(double d);
int dmax(int d1, int d2) { return (d1 < d2) ? d2 : d1; }

int main()
{
	double x1, y1, a1;
	double x2, y2, a2;
	double x, y;
	bool f_x, f_y;

	while (true) {
		cin >> x1 >> y1 >> a1 >> x2 >> y2 >> a2;
		if (cin.eof()) break;
		


		f_x = false; f_y = false;

		int p = dmax(dmax(is_double(x1), is_double(x2)), dmax(is_double(y1), is_double(y2)));
		if (p) { p *= 10; x1 *= p; x2 *= p; y1 *= p; y2 *= p; }

		if (x1 && x2) {
			int temp = x1;
			x1 *= x2; y1 *= x2; a1 *= x2;
			x2 *= temp; y2 *= temp; a2 *= temp;

			double y3 = y2 - y1, a3 = a2 - a1;

			y = a3 / y3;
			f_y = true;
		}

		if (y1 && y2) {
			int temp = y1;
			x1 *= y2; y1 *= y2; a1 *= y2;
			x2 *= temp; y2 *= temp; a2 *= temp;

			double x3 = x2 - x1, a3 = a2 - a1;

			x = a3 / x3;

			f_x = true;
		}

		if (!f_x || !f_y) {
			// どちらかに0があれば
			if (!x1) { y = a1 / y1; f_y = true; }
			else if (!x2) { y = a2 / y2; f_y = true; }

			if (!y1) { x = a1 / x1; f_x = true; }
			else if (!y2) { x = a2 / x2; f_x = true; }

			if (f_x) {
				if (x1) { x1 *= x; a1 -= x1; y = a1 / y1; }
				else if (x2) { x2 *= x; a2 -= x2; y = a2 / y2; }

				f_y = true;
			}
			if (f_y) {
				if (y1) { y1 *= y; a1 -= y1; x = a1 / x1; }
				else if (y2) { y2 *= y; a2 -= y2; x = a2 / x2; }

				f_x = true;
			}
		}

		if (f_x && f_y) {
			x = m_round(x); y = m_round(y);
			printf("%.3lf %.3lf\n", x, y);
		}
	}

	return 0;
}

int is_double(double dl)
{
	dl = fabs(dl);
	int d = (int)dl;
	double temp = dl - (double)d;

	if (!temp) return 0;

	else {
		int i;
		for (i = 0; temp < 1; ++i) temp *= 10;

		return i;
	}
}

double m_round(double d)
{
	bool flag = false;
	if (d < 0) { flag = true; d = -d; }

	d *= 1000;
	d += 0.5;

	int t1 = (int)d;
	double t2 = d - (double)t1;
	d -= t2;

	d /= 1000;

	if (flag) { d = -d; }

	return d;
}

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