Go: package main

import (
  "fmt"
)

func main() {
  var a,b,c,d,e,f float64
  var x,y float64
  for _, err := fmt.Scan(&a, &b, &c, &d, &e, &f); err == nil;
   _, err = fmt.Scan(&a, &b, &c, &d, &e, &f) {
    y = (a*f-c*d)/(a*e-b*d)
    x = (c-b*y)/a
    fmt.Printf("%.3f %.3f\n", x,y)
  }
}

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

#define MAX 256

int main(void){

	double a, b, c, d, e, f;
	double ansx[MAX], ansy[MAX];

	int i = 0;

	while (scanf("%f%f%f%f%f%f%f", &a,&b,&c,&d,&e,&f) != EOF){
		ansx[i] = (c*e - b*f) / (a*e - b*d);
		ansy[i] = (c*d - a*f) / (b*d - a*e);
		i++;
	}

	for (int j = 0; j < i; j++){
		printf("%.3f %.3f\n", ansx[j], ansy[j]);
	}

	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <stdio.h>
#include <cstdlib>
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 << "error" << endl;
    exit(1);
  }else if(x == 0){
    cerr << "error" << endl;
    exit(1);
  }else if(y == 0){
    cerr << "error" << 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;
    }

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

  return 0;


}

C++: #include <stdio.h>
float round3(float a){
	a=a*10000;
	if(int(a)%10>5)a+10;
	a=double (int (a));
	a=a/10000;

}
int main(){
	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){
		if(a*e==b*d){
			x=(c*e-b*f);
			y=(c*d-a*f);
		}else{
			x=(c*e-b*f)/(a*e-b*d);
			y=(c*d-a*f)/(b*d-a*e);
		}
		
		
		x=round3(x);
		y=round3(y);
		printf("%.3f %.3f\n",x,y);
	}
	return 0;
}

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

using namespace std;


int main(){
	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){
		x = (double)(c*e - b*f) / (double)(a*e - d*b);
		y = (c - a*x)/b;
		if(x == -0.0){ x = 0; }
		if(y == -0.0){ y = 0; }
		printf("%f %f\n",x,y);
	}
	return 0;
}

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

using namespace std;
double a,b,c,d,e,f;
double x,y;
double xMultiply, yMultiply;


int main()
{
    while(cin >> a >> b >> c >> d >> e >> f)
    {
        xMultiply = b;
        yMultiply = e;
        a = yMultiply * a;
        b = yMultiply * b;
        c = yMultiply * c;
        d = xMultiply * d;
        e = xMultiply * e;
        f = xMultiply * f;

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

        if (x == -0)
        {
            x = 0;
        }
        if (y == -0)
        {
            y = 0;
        }

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

    }
}

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

#define MAX 256

int main(void){

	float a, b, c, d, e, f;
	float ansx[MAX], ansy[MAX];

	int i = 0;

	while (scanf("%f%f%f%f%f%f%f", &a,&b,&c,&d,&e,&f) != EOF){
		if (a*e != b*d){
			ansx[i] = (c*e - b*f) / (a*e - b*d);
			ansy[i] = (c*d - a*f) / (b*d - a*e);
			if ((int)(ansx[i] * 10000) % 10 > 4){
				ansx[i] += 0.001;
			}
			if ((int)(ansy[i] * 10000) % 10 > 4){
				ansy[i] += 0.001;
			}
		}
		i++;
	}

	for (int j = 0; j < i; j++){
		printf("%.3f %.3f\n", ansx[j], ansy[j]);
	}
	
	return 0;
}

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

bool sisya(double x)
{
	x = x*1000;
	x = x - static_cast<double>(static_cast<int>(x));
	x = x+0.5;
	if(x >= 1.0){
		return true;
	}
	return false;
}

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) ;
		if(sisya(x))
			x += 0.001;
		y = (f/d - c/a) / (e/d - b/a) ;
		if(sisya(y))
			y += 0.001;
		cout << setprecision(3) << fixed << x << endl;
		cout << setprecision(3) << fixed << y << endl;
	}
	return 0;
}

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

auto main () -> int
{
    double a , b , c , d , e , f;
    while (std::cin >> a >> b >> c >> d >> e >> f)
    {
        auto delta = a * e - b * d;
        auto x = (e * c - b * f) / delta;
        auto y = (- c * d + a * f) / delta;
        auto x_ = static_cast <int> (std::round (x * 1000));
        auto y_ = static_cast <int> (std::round (y * 1000));
        std::printf ("%d.%03d %d.%03d\n" , x_ / 1000 , x_ % 1000 , y_ / 1000 , y_ % 1000);
    }
}

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

using namespace std;

/* ax + by = c
   dx + ey = f
   
   (x, y) = { (ce - bf) / (ae - bd), (af - cd) / (ae - bd) } */


void Equation2(int a, int b, int c, int d, int e, int f, double& x, double& y)
{
	x = (c * e - b * f) / (a * e - b * d);
	y = (a * f - c * d) / (a * e - b * d);
}

int main()
{
	int A[12];

	double X[2];
	double Y[2];

	for (int i = 0; i < 12; i++) { cin >> A[i]; }

	Equation2(A[0], A[1], A[2], A[3], A[4] , A[5] , X[0], Y[0]);
	Equation2(A[6], A[7], A[8], A[9], A[10], A[11], X[1], Y[1]);

	cout << fixed << setprecision(3) << X[0] << ' ' << Y[0] << endl << X[1] << ' ' << Y[1] << endl;

	return 0;
}

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

double round(double num);
/*
??£???????¨????
	ax + by = c
	dx + ey = f
????§£x, y???????????????????????°??????
*/
int main() {
	double a, b, c, d, e, f;
	int cnt = 0;						//??\??????????????£???????¨????????????°
	std::vector<double> x_vector;		//x????§£???????´?
	std::vector<double> y_vector;		//y????§£???????´?

#if 0
	while (cnt < 2) {
		cin >> a >> b >> c >> d >> e >> f;
#else
	while (cin >> a >> b >> c >> d >> e >> f) {
#endif
		double x = (b * f - c * e) / (b * d - a * e);
		double y = (c * d - a * f) / (b * d - a * e);

		cnt++;
		x_vector.push_back(x);
		y_vector.push_back(y);
	}

	for (unsigned int i = 0; i < cnt; i++) {
		double x_result = round(x_vector[i]);
		double y_result = round(y_vector[i]);

		std::cout << std::fixed;
		std::cout << std::setprecision(3) << x_result << " ";
		std::cout << std::setprecision(3) << y_result << endl;
	}

	//???????????°
	//while (1);

	return 0;
}

//?°???°????¬¬4???????????¨?????\????????¢??°
double round(double num) {
	int num_mul_10000 = (int)(double)(num * 10000);
	int num_mul_1000  = (int)(double)(num * 1000);

	//???????????°
	//cout << num_mul_10000 << " " << num_mul_1000 << endl;

	if (5 <= (num_mul_10000 - num_mul_1000 * 10)) {
		return num + 0.001;
	}
	else {
		return num;
	}
}

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

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

using namespace std;

int main(int argc, char *argv[]) {
  double a, b, c, d, e, f;

  while (true) {
    cin >> a >> b >> c >> d >> e >> f;
    if (cin.eof())
      break;
    a -= d * b / e;
    c -= f * b / e;
    double x = c / a;
    if (x >= 0)
      x = (int)(x * 1000 + 0.5);
    else
      x = (int)(x * 1000 - 0.5);
    x /= 1000;
    double y = (f - d * x) / e;
    if (y >= 0)
      y = (int)(y * 1000 + 0.5);
    else
      x = (int)(y * 1000 - 0.5);
    y /= 1000;

    if (x == -0.0)
      x = 0.0;
    if (y == -0.0)
      y = 0.0;
    printf("%.3lf %.3lf\n", x, y);
  }
  return 0;
}

C++: #include <stdio.h>
#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 * e - b * f) / (a * e - b * d);

		if (x == -0) {
			x = 0;
		}

		if (y == -0) {
			y = 0;
		}

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

	return 0;
}