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<cstdio>
using namespace std;

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

C++: #include <bits/stdc++.h>
using namespace std;
double a,b,c,d,e,f,y,x;

int main (){
	while(cin>>a>>b>>c>>d>>e>>f){
		y=(((c*d)-(f*a))/((b*d)-(e*a)));
		x=((c*d)-(b*y*d))/(a*d);
		if(x==0){
			x=abs(x);
		}
		if(y==0){
			y=abs(y);
		}
		cout<<fixed<<showpoint<<setprecision(3);
		cout<<x<<" "<<y<<endl;
	}
}

C++: #include <stdio.h>


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

    while (scanf("%d %d %d %d %d %d", 
    &a, &b, &c, &d, &e, &f)==6){
        x = (double)(e*c-b*f)/(a*e-b*d);
        y = (double)(-d*c+a*f)/(a*e-b*d);
        // round
        tmp = (int)(x*1000) % 10;
        if (x<5) x -= tmp/1000;
        if (x>=5) x += (10-tmp)/1000;
        tmp = (int)(y*1000) % 10;
        if (y<5) y -= tmp/1000;
        if (y>=5) y += (10-tmp)/1000;
        // output
        printf("%.3f %.3f\n", x, y);
    }
    return 0;
}

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

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

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

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

C++: #include<stdio.h>

int main(void)
{
	int a,b,c,d,e,f,t=0,n;
	double x[100]={0},y[100]={0};
	
	while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF)
	{
		x[t]=(c*e-b*f)/(a*e-b*d);
		y[t]=(d*c-a*f)/(b*d-a*e);
		t++;
	}

	for(n=0;n<t;n++)
	{
		printf("%.3f %.3f\n",x[n],y[n]);
	}
	return 0;
}

C++: #include<stdio.h>
int main(void) {
	int a, b, c, d, e, f, g, h=0;
	while (h<2)
	{
		scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f);
		for (double x = -1000; x <= 1000; x++)
		{
			for (double y = -1000; y <= 1000; y++)
			{
				if (a*x + b*y == c&&d*x + e*y == f)
				{
					printf("%.4f %.4f\n", x, y);
				}
			}
		}
		h++;
	}

	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <string>
#include <set>
#include <queue>
#include <stack>
#include <cmath>
#include <functional>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long > vll;
typedef vector< vi > vvi;
int main() {
	double a, b, c, d, e, f, x, y;
	while (cin >> a >> b >> c >> d >> e >> f) {
		x = (e*c - b*f) / (a*e - b*d);
		y = (a*f - c*d) / (a*e - b*d);
		printf("%3f %3f\n", x, y );
	}
}

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

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

using namespace std;

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

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

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

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

	}
}

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

int main(){
    double a,b,c,d,e,f,x,y;
    while(cin >> a >> b >> c >> d >> e >> f){
        double detA;
        detA = a * e - b * d;
        x = (c * e - f * b) / detA;
        y = (a * f - c * d) / detA;
        if(x>-0.001 && x<=0) x=0;
        if(y>-0.001 && y<=0) y=0;
        cout << x << " " << y << endl;
    }
}

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

using namespace std;

int main(){
  double a,b,c,d,e,f;
  vector<double> al,bl,cl,dl,el,fl;
  double x,y,n,m;

  while(cin >> a >> b >> c >> d >> e >> f){
    al.push_back(a);
    bl.push_back(b);
    cl.push_back(c);
    dl.push_back(d);
    el.push_back(e);
    fl.push_back(f);
  }

  for(int i=0; i<al.size(); i++){
    n = bl[i]/el[i];
    m = al[i]/dl[i];
    x = (cl[i]-n*fl[i])/(al[i]-n*dl[i]); 
    y = (cl[i]-m*fl[i])/(bl[i]-m*el[i]);
    cout << setprecision(4) << fixed << x << " " << y << endl;
  }

  return 0;
}

C++: t = 0
while t == 0:	
	try:
		a,b,e,c,d,f = [int(i) for i in input().split()]
	except:
		break
	else:
		x = (d*e - b*f) / (a*d - b*c) + 0
		y = (a*f - c*e) / (a*d - b*c) + 0
		print("{0:.3f}".format(x) + "{0:.3f}".format(y))

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

int main(){
	while(true){
		double a,b,c,d,e,f;
		cin>>a>>b>>c>>d>>e>>f;
		if(cin.fail()) break;
		double x=(c*e-b*f)/(a*e-b*d);
		double y=(c*d-a*f)/(b*d-a*e);
		if(x==0) x=0;
		if(y==0) y=0;
		cout<<fixed<<setprecision(3)<<x<<" "<<y<<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 x, y;
		x = (c * e - b * f) / (a * e - b * d);
		y = (c - (a * x)) / b;
		
		if (x == -0.000) x = 0.000;
		if (y == -0.000) y = 0.000;

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

	return (0);
}

C++: #include<cstdio>
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)
	{
		y=(a*f-d*c)/(-(d*b)+a*e);
		x=(c-b*y)/a;
		printf("%.3lf %.3lf\n",x,y);
	}
	return 0;
}
/*
ax=c-by
->x=(c-by)/a
d((c-by)/a)+ey=f
(dc-dby)/a+ey=f
(dc-dby)+aey=af
-dby+aey=af-dc
y(-db+ae)=af-dc
->y=(af-dc)/(-db+ae)
*/

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){
    Y=(c*d-f*a)/(b*d-e*a);
    X=(c-b*Y)/a;

    Y*=10000.0;
    if((int)Y%10>4)Y+=1.0;
    Y/=10000.0;
    X*=10000.0;
    if((int)X%10>4)X+=1.0;
    X/=10000.0;
    printf("%.3f %.3f\n",X,Y);
    
  }
  
}

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

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

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