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<cstdio>
#include<algorithm>
#include<cmath>

using namespace std;

int main(){
        double a, b, c, d, e, f, g, h, i, j, k, l, m, n, x, y;

        while(scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f) != EOF){
                g = a * d;      //公倍数
                j = b;
                k = c;
                l = a;
                b *= g / a;
                c *= g / a;
                e *= g / d;
                f *= g / d;
                a *= g / a;
                d *= g / d;

                h = b - e;
                i = c - f;

                y = i / h;
                x = k - y * j;
                x /= l;
                y *= 1000;
                y = floor(y + 0.5);
                y /= 1000;
                x *= 1000;
                x = floor(x + 0.5);
                x /= 1000;

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

        return 0;
}

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

C++: #include<stdio.h>
int main(){
	double a,b,c,d,e,f;
	double x,y,z,v;
	while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=-1)
	x=(c*e-b*f)/(a*e-b*d);
	y=(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<iostream>
using namespace std;

int main(){
	double a[6];
	double x,y;
	while(cin>>a[0]>>a[1]>>a[2]>>a[3]>>a[4]>>a[5]){
		double b=a[0]*a[4]-a[1]*a[3];
		double c=a[0];
		a[0]=a[4];
		a[4]=c;
		a[1]*=-1.0;
		a[3]*=-1.0;
		x=(a[0]*a[2]+a[1]*a[5])/b;
		y=(a[3]*a[2]+a[4]*a[5])/b;
		if(x==-0.0)x=0.0;
		if(y==-0.0)y=0.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++: #include <iostream>
#include <iomanip>
using namespace std;

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

	int i = 0;
	while(cin >> a[i] >> b[i] >> c[i] >> d[i] >> e[i] >> f[i]) {
		if(a[i] != 0 && b[i] != 0 && d[i] != 0 && e[i] != 0) {
			x[i] = (b[i]*f[i]-e[i]*c[i])/(b[i]*d[i]-a[i]*e[i]);
			y[i] = (d[i]*c[i]-a[i]*f[i])/(b[i]*d[i]-a[i]*e[i]);
		} else {
			if(a[i] == 0) {
				y[i] = c[i]/b[i];
				x[i] = (f[i]-e[i]*y[i])/d[i];
			} else if(b[i] == 0) {
				x[i] = c[i]/a[i];
				y[i] = (f[i]-d[i]*x[i])/e[i];
			} else if(d[i] == 0) {
				y[i] = f[i]/e[i];
				x[i] = (c[i]-b[i]*y[i])/a[i];
			} else if(e[i] == 0) {
				x[i] = f[i]/d[i];
				y[i] = (c[i]-a[i]*x[i])/b[i];
			}
		}
		i++;
	}

	for(int j=0; j<i; j++) cout << fixed << setprecision(3) << x[j] << " " << y[j] << endl;

	return 0;
}

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

using namespace std;

int main() {

	double ans[4], coe[12];
	int i;

	for (i = 0; i < 12; i++) 
		cin >> coe[i];
	ans[0] = (coe[2] * coe[4] - coe[1] * coe[5]) / (coe[0] * coe[4] - coe[1] * coe[3]);
	ans[1] = (coe[2] * coe[3] - coe[0] * coe[5]) / (coe[1] * coe[3] - coe[0] * coe[4]);
	ans[2] = (coe[8] * coe[10] - coe[7] * coe[11]) / (coe[6] * coe[10] - coe[7] * coe[9]);
	ans[3] = (coe[8] * coe[9] - coe[6] * coe[11]) / (coe[7] * coe[9] - coe[6] * coe[10]);
	
	printf("%.3f %.3f\n", ans[0], ans[1]);
	printf("%.3f %.3f\n", ans[2], ans[3]);

	return 0;

}

C++: #include "stdio.h"
#include "math.h"

#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <cstring>
#include <string>
#include <sstream>
#include <algorithm>
#include <iomanip>
#include <iostream>

#define VARIABLE(x) cerr << #x << "=" << x << endl
#define BINARY(x) cerr << #x << "=" << static_cast<bitset<16> >(x) << endl;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define REP(i,m,n) for (int i=m;i<(int)(n);i++)

const int INF = 10000000;
int dx[4]={1, 0, -1, 0}, dy[4]={0, 1, 0, -1};
using namespace std;
typedef long long  ll;

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

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

}

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

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

	while(cin >> a >> b >> c >> d >> e >> f){
		float x, y;
		x = (float)(b*f - c*e)/(b*d -a*e);
		y = (float)(c - a*x)/b;
		cout << x << " " << y << endl;
	}
	return 0;
}

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

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

using namespace std;

typedef struct {
        double x1;
        double x2;
} answer;

answer solve_simultaneous_equations(double a, double b, double c, double d, double e, double f) {
        answer ans;
        ans.x1 = (c*e - b*f) / (a*e - b*d);
        ans.x2 = (c*d - a*f) / (b*d - a*e);
        return ans;
}

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

        while(cin >> a >> b >> c >> d >> e >> f) {
                answer ans;
                ans = solve_simultaneous_equations(a,b,c,d,e,f);
                cout << showpoint << fixed << setprecision(3) << ans.x1;
                cout << " ";
                cout << showpoint << fixed << setprecision(3) << ans.x2;
                cout << endl;
        }

        return 0;
}

C++: #include<stdio.h>
int main() {
	double a, b, c, d, e, f;
	double x, y, z;
	while (a != EOF) {
		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;
}