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 <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-a*e);
x=(c-b*y)/a;
cout<<showpoint<<setprecision(4)<<x<<" "<<y<<endl;
}
return 0;}

C++: #include <math.h>
#include <iostream>
#include <ios>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <string>

#define YES "YES"
#define NO "NO"
#define space ' '

using namespace std;

void func();

int main(void)
{
	
	func();

	return 0;
}

// using matrix	?????????????????´??????
void func()
{
	int a, b, c, d, e, f;
	double x, y;

	while (cin >> a >> b >> c >> d >> e >> f, !cin.eof()){


		cout << fixed << setprecision(3);


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


			if (x == 0)
				x = 0.0;
			if (y == 0)
				y = 0.0;
		}
		cout << x << space << y << endl;


		cout << dec;
	}
}

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

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

  return 0;
}

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

float s(float a) {
	a *= 1000;
	if (a > 0) {
		a += 0.5;
	}
	else {
		a -= 0.5;
	}
	int b = a;
	a = b;
	a /= 1000;
	return a;
}

int main() {
	float a, b, c, d, e, f;
	while (~scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)) {
		float x, y;
		if (a == 0) {
			y = c / b;
			x = (f - e * y) / d;
		}
		else if (d == 0) {
			y = f / e;
			x = (c - b * y) / a;
		}else {
			b *= d;
			c *= d;
			e *= a;
			f *= a;
			y = (c - f) / (b - e);
			x = (c / d - b / d * y) / a;
		}
		printf("%.3f %.3f\n", s(x), s(y));
	}
}

C++: #include <iostream>
#include <iomanip>
#include <sstream>
#include <stdio.h>
#include <vector>
#include <stack>
#include <queue>
#include <algorithm>
#include <math.h>
#include <utility>
#include <string>
#include <ctype.h>
#include <cstring>
#include <cstdio>
#include <sstream>
using namespace std;

#define FOR(i,k,n) for(int i = (k); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define INF 114514810
#define ll long long

double a, b, c, d, e, f, x, y;
int main()
{
	while (cin >> a >> b >> c >> d >> e >> f)
	{
		y = (c*d - f*a) / ((b*d) - (e*a));
		x = (c - b*y) / a;
		if (x == 0) x = 0;
		if (y == 0) y = 0;
		printf("%.3f %.3f\n", x, y);
	}
	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>
#include<cstdio>
using namespace std;
int main()
{
	while (true)
	{
		double a1, b1, c1, a2, b2, c2;
		cin >> a1>> b1 >> c1 >> a2 >> b2 >> c2;
		if (cin.fail())
			break;
		double D = a1 * b2 - a2 * b1;
		double D1 = c1 * b2 - c2 * b1;
		double D2 = a1 * c2 - a2 * c1;
		double x = D1 / D;
		double y = D2 / D;
		if (x == 0) x = 0;
		if (y == 0) y = 0;
		printf("%.3f %.3f\n", x, y);
	}
}

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

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

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++: //
//  main.cpp
//  0004
//
//  Created by 竹内 文登 on 13/07/14.
//  Copyright (c) 2013年 竹内 文登. All rights reserved.
//

#include <iostream>
#include <cstdio>
using namespace std;

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

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

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

C++: #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

#define N 1024


int main()
{
	char buff[N];
	
	while (NULL != fgets(buff, N, stdin))
	{
		double a, b, c, d, e, f;
		sscanf(buff, "%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f);
		
		double dd = a * e - b * d;
		double x = ( e * c - b * f ) / dd;
		double y = ( - d * c + a * f ) / dd;
		
		x = x == -0.0 ? 0.0 : x;
		y = y == -0.0 ? 0.0 : y;

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


}

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

int main(){
	vector<double*> data;
	while(!cin.eof()){
		int a,b,c,d,e,f;
		cin >> a >> b >> c >> d >> e >> f;
		double x[2];
		x[0] = (double)(c*e - f*b)/(a*e - d*b);
		x[1] = (double)(a*f - d*c)/(a*e - d*b);
		if(x[0] == 0)x[0] = 0.;
		if(x[1] == 0)x[1] = 0.;
		data.push_back(x);
	}
	vector<double*>::iterator it = data.begin();
	for(;it != data.end();++it)
		printf("%.3f %.3f",(*it)[0],(*it)[1]);
	return 0;
}

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

void OutputSolution(int a, int b, int c, int d, int e, int f)
{
    double x, y;
	if(a == 0){
		y = c / b;
		x = (f-e*y) / d;
	}else{
		int A = a;
		a *= d;
		b *= d;
		c *= d;
		d *= A;
		e *= A;
		f *= A;
		y = (c-f) / (b-e);
		x = (c-b*y) / a;
	}
	if(x == -0) x = 0;
	if(y == -0) y = 0;
	cout << fixed << setprecision(3) << x << ' ' << y << endl;
}

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

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

int main() {
	int number[6];
	double x, y;
	while (cin >> number[0]) {
		for (int i = 1; i < 6; i++) {
			cin >> number[i];
		}
		y = (number[2] * number[3] - number[0] * number[5])
			/ (number[1] * number[3] - number[0] * number[4]);
		x = (number[2] - number[1] * y) / number[0];
		cout << fixed << setprecision(3) << x << flush;
		cout << " " << flush;
		cout << fixed << setprecision(3) << y << endl;
	}
	return 0;
}

C++: #include <stdio.h>
#include <math.h>
 
int main(void) {
double a, b, c, d, e, f, x, y;
while (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) > 0) {
x = (c * e - b * f) / (a * e - b * d);
y = (a * f - c * d) / (a * e - b * d);
if (x == -0.0) x = 0.0;
if (y == -0.0) y = 0.0;
printf("%01.3lf %01.3lf\n", 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&&x>-0.0004){
			x = 0.000000;
		}
		if(y<0&&y>-0.0004){
			y = 0.000000;
		}
		printf("%0.3f %0.3f\n",x,y);
	}
	
	
	return 0;
}