Go: package main

import (
        "fmt"
        "bufio"
        "os"
)

func main() {
        var a, b, c, d, e, f float64
        sc := bufio.NewScanner(os.Stdin)
        for sc.Scan() {
                fmt.Sscanf(sc.Text(), "%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)

                det := a*e - b*d
                x := (e*c - b*f) / det
                y := (a*f - c*d) / det
                fmt.Printf("%04f %04f\n", x, y)
        }
}

C++: #include<stdio.h>
int main(){
	int a,b,c,d,e,f;
	double x,y,z,v;
	while(1){
	scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f);
	x=(double)(c*e-b*f)/(a*e-b*d);
	y=(double)(c*d-a*f)/(b*d-a*e);
	if(x>=-0.0005&&x<0.0005)	x=0;
	if(y>=-0.0005&&y<0.0005)	y=0;
	printf("%.3lf %.3lf\n",x,y);
}
}

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

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

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    // ????????§ ax+by=c, dx+ey=f ????§£?????????????????¨???????????¨???????¨????????????????(1)
    vector<vector<double>> answers;
    double a, b, c, d, e, f;
    int dump;
    while(cin >> a >> b >> c >> d >> e >> f) {
        double det = (double)(a*e-b*d);
        double ansx = (e*c+(-b)*f)/det;
        double ansy = ((-d)*c+a*f)/det;
        if(ansx == 0) ansx = 0.0;
        if(ansy == 0) ansy = 0.0;
        answers.push_back({ansx,ansy});
    }
    for(auto elm : answers) {
        cout << fixed << setprecision(3) << elm[0] << " " << elm[1] << endl;
    }

    return 0;
}

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

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

C++: #include <iostream>
#include <cstdio>
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("%.3lf %.3lf\n",x,y);
	}
	
	
}

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

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

C++: #include <iostream>
using namespace std;
int main(void){
    double A[2][3];
    while(cin >> A[0][0] >> A[0][1] >> A[0][2] >> A[1][0] >> A[1][1] >> A[1][2]){
        for(int i = 1; i < 3; i++){
            A[0][i] /= A[0][0];
        }
        A[0][0] /= A[0][0];
        for(int i = 1; i < 3; i++){
            A[1][i] -= A[0][i] * A[1][0];
        }
        A[1][0] -= A[0][0] * A[1][0];
        for(int i = 0; i < 3; i++){
            if(i != 1)
                A[1][i] /= A[1][1];
        }
        A[1][1] /= A[1][1];
        for(int i = 0; i < 3; i++){
            if(i != 1)
                A[0][i] -= A[1][i] * A[0][1];
        }
        A[0][1] -= A[1][1] * A[0][1];
        
        cout << A[0][2] << " " << A[1][2] << endl;
    }
}

C++: #include <iostream>

using namespace std;

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

	while(cin >> a >> b >> c >> d >> e >> f)
		printf("%.3lf %.3lf\n",(e*c-b*f)/(a*e-b*d)+0,(-d*c+a*f)/(a*e-b*d)+0);

	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 x = (double)((e*c-b*f) / (a*e-b*d));
		double 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);
	}
    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <iomanip>
#include <cmath>
 
using namespace std;
int main(){
    double 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);
        x = round(1000*x) / 1000;
        y = round(1000*y) / 1000;
        if(x==0)x=0;
        if(y==0)y=0;
        cout << fixed << setprecision(3) << x << " " << y << endl;
    }
    return 0;
}

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

int main(void){

	while (true){
		int a, b, c, d, e, f;
		cin>>a>>b>>c>>d>>e>>f;
		if (cin.eof()) break;

		float x, y, tmp;
		tmp = (a*e-b*d);
		if (tmp>0){
			x = (c*e-b*f)/tmp;
			y = -(c*d-a*f)/tmp;
		}
		else{
			x = (-c*e+b*f)/(-tmp);
			y = (c*d-a*f)/(-tmp);
		}

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

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main(){
 double a,b,c,d,e,f,y,x;
 int i=0,n;
while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f) != EOF){
  y=((c*d)-(a*f))/((b*d)-(a*e));
  x=((c*e)-(b*f))/((a*e)-(b*d));
  if(x == 0){x = 0;}
  if(y == 0){y = 0;}
  printf("%.3lf %.3lf\n", x,y);
  }
  i++;
}
  return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	double a,b,c,d,e,f,x,y;
	int xx,yy;
	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("%d.",(int)x);
		printf("%d",(int)(x*10)-(int)x*10);
		printf("%d",(int)(x*100)-(int)x*100);
		printf("%d",(int)(x*1000)-(int)x*1000);
		printf(" ");
		printf("%d.",(int)y);
		printf("%d",(int)(y*10)-(int)y*10);
		printf("%d",(int)(y*100)-(int)y*100);
		printf("%d",(int)(y*1000)-(int)y*1000);
		printf("\n");
	}
	return 0;
}

C++: #include <iomanip>
#include <utility>
#include <vector>
#include <math.h>
#include <algorithm>
#include <string>
#include <iostream>
using namespace std;



int main()
{
	double a[3], b[3];
	while (cin >> a[0] >> a[1] >> a[2] >> b[0] >> b[1] >> b[2])
	{
		if (a[0] == 0)
		{
			double c = a[2] / a[1];
			double d = (b[2] - b[1] * c) / b[1];
			a[2] = d;
			b[2] = d;
		}
		else
		{
			double c = 1;
			if (b[0] != 0)
			{
				c = a[0] / b[0];
				b[1] = b[1] * c - a[1];
				b[2] = b[2] * c - a[2];
			}
			b[2] /= b[1];
			b[1] = 1;
			a[2] -= b[2] * a[1];
			a[2] /= a[0];
		}
		if (a[2] < 0.0001 && a[2] > -0.0001)
			a[2] = 0.000;
		if (b[2] < 0.0001 && b[2] > -0.0001)
			b[2] = 0.000;

		cout << fixed << setprecision(3) << a[2] << b[2] << endl;
	}

	return 0;
}

C++: #include<queue>
#include<stack>
#include<cstdio>
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-f*b)/(a*e-d*b);
		y=(c-a*x)/b;
		printf("%.3f %.3f\n",x+(1e-10),y+(1e-10));
	}
	return 0;
	
}

C++: #include<stdio.h>
int main() {
	double a, b, c, d, e, f;
	double x, y, z;
	int i;
	for (i = 0; i < 2; i++) {
		scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f);
		z = d / a;
		b *= z;
		c *= z;
		y = (c - f) / (b - e);
		x = (f - e*y) / d;
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}

C++: #include <stdio.h>

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

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