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<iomanip>
using namespace std;
int main()
{
	double line[6];
	double anx,any;
	for(int ii=0;ii<2;++ii)
	{
		for(int i=0;i<6;++i)
		{
			cin>>line[i];
		}
		double doll;
		doll=line[0];
		for(int i3=0;i3<3;++i3)
		{
			line[i3]*=line[3];
		}
		for(int i3=3;i3<6;++i3)
		{
			line[i3]*=doll;
		}
		double bu[3];
		for(int i4=0;i4<3;++i4)
		{
			bu[i4]=line[i4];
			line[i4]-=line[i4+3];
		}
		any=line[2]/line[1];
		anx=(bu[2]-bu[1]*any)/bu[0];
		if(anx==0){
			anx=0;
		}
		if(any==0){
			any=0;
		}
		cout<<fixed << setprecision(4)<<anx<<" "<<any<<endl;
	}
	return 0;
}

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

int main(){

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

    return 0;
}

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

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

	float det = a*e-b*d;
	float x = 1/det*(c*e - b*f);
	float y = 1/det*(-c*d + a*f);	
	if(x < 0.0000001) x = 0;
	if(y < 0.0000001) y = 0;

	cout << fixed << setprecision(3) << x << ' ' << y <<endl;
	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){
        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);
    }
    return 0;
}

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

int main()
{
	int a, b, c, d, e, f;
	double x, y;
	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);
		cout << fixed
			<< setprecision(3)
			<< x<<" "<<y<< endl;
	}

	return 0;
}

C++: #include<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<iostream>
#include<queue>
#include<map>
#include<set>

using namespace std;

#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)

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

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

int main() {
	double a, b, c, d, e, f, x, y, o, p;
	while (cin >> a) {
		cin >> b >> c >> d >> e >> f;
		b *= d;
		c *= d;
		e *= a;
		f *= a;
		o = b - e;
		p = c - f;
		y = p / o;
		x = (c - b*y) / (a*d);
		printf("%.3f %.3f", x, y);
	}
	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){
		x = (c*e - b*f)/(double)(a*e - b*d);
		y = (c*d - a*f)/(double)(b*d - a*e);

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

	return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <algorithm>

using namespace std;

int main()
{
	int a[1000],b[1000],c[1000],d[1000],e[1000],f[1000];
	float x[1000],y[1000];
	int len=0;
	while (cin >> a[len] >> b[len] >> c[len] >> d[len] >> e[len] >> f[len])
		len++;

	for (int i=0; i < len; i++) {
		x[i] =  ((e[i] * c[i] - b[i] * f[i]) / (e[i] * a[i] - b[i] * d[i]));
		y[i] =  ((c[i] * d[i] - f[i] * a[i]) / (b[i] * d[i] - a[i] * e[i]));
	}
	for (int i=0; i < len; i++) {
		printf("%.3lf %.3lf\n",x[i],y[i]);
	}
	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<cmath>
#include<cstdio>
using namespace std;
int main(){
	double a,b,c,d,e,f,n[20];
	while(cin>>a>>b>>c>>d>>e>>f){
	double x,y;
	int w;
	if(a == 0){
		n[0] = 0;
		n[1] = 0;
	}else{
		n[0] = c / a;
		n[1] = b / a;
	}
	if(d == 0){
		n[2] = 0;
		n[3] = 0;
	}else{
		n[2] = f / d;
		n[3] = e / d;
	}
	if(b == 0){
		n[4] = 0;
		n[5] = 0;
	}else{
		n[4] = c / b;
		n[5] = a / b;
	}
	if(e == 0){
		n[6] = 0;
		n[7] = 0;
	}else{
		n[6] = f / e;
		n[7] = d / e;
	}
	if(n[1] - n[3] == 0){
		y = 0;
	}else{
		y = (n[0] - n[2]) / (n[1] - n[3]);
	}
	if(n[5] - n[7] == 0){
		x = 0;
	}else{
		x = (n[4] - n[6]) / (n[5] - n[7]);
	}
	x = x * pow(10, - 5);
	double xx = x + 0.5;
	xx = xx * pow(10,5);
	y = y * pow(10, - 5);
	double yy = y + 0.5;
	yy = yy * pow(10,5);

	printf("%0.3f,%0.3f\n",&xx,&yy);



}
return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <iterator>
#include <cmath>
#include <stack>
#include <functional>
#include <iomanip>
using namespace std;

int main()
{
  double a,b,c,d,e,f;
  while(cin >> a >> b >> c >> d >> e >> f, !cin.eof()) {
    double x,y;
    x = 1/(a*e-b*d)*(e*c-b*f);
    y = 1/(a*e-b*d)*((-d)*c+a*f);
    cout << fixed << setprecision(3) << x << ' ' <<   y << endl;
  }

  return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
double Emat(int a,int b,int c,int d);

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

double Emat(int a,int b,int c,int d){
	return a*d-b*c;
}

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

C++: #include<iostream>
#include<iomanip>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<cmath>
#include<queue>
#include<stack>
#include<functional>
#include<string>
#include<cstring>
#include <sstream>
using namespace std;
int main(void){
    double a,b,c,d,e,f,x,y;
    while(cin >> a >> b >> c >> d >> e >> f){
        double ad = a / d;
        d *= ad;
        e *= ad;
        f *= ad;
        d -= a;
        e -= b;
        f -= c;
        y = f/e;
        x = (c - b * y)/a;
        y *= 1000;
        y = round(y);
        y /= 1000;
        x *= 1000;
        x = round(x);
        x /= 1000;
        cout << fixed << setprecision(3) << x << " " << y << endl;
    }
    return 0;
}

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

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

	while(cin >> a >> b >> c >> d >> e){
		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<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main(){
double a,b,c,d,e,f;
double x,y;
while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF){
    x=(e*c-b*f)/(a*e-d*b);
    y=(f*a-c*d)/(a*e-d*b);
    printf("%.3lf %.3lf\n",x,y);

}
printf("\n");
return 0;
}

C++: #include<iostream>
#include<math.h>
#include<cstdio>
using namespace std;
int main(){
	while(1){
		int a,b,c,d,e,f;
		cin>>a>>b>>c>>d>>e>>f;
		if(cin.eof()) {break;}
		double d1,d2,d3;
		d1=a*e-b*d;
		d2=c*e-b*f;
		d3=a*f-c*d;
                double x=d2/d1,y=d3/d1;
		if(x<0&&y<0)
		    printf("-%.3f -%.3f\n",fabs(x),fabs(y));
                if(x<0&&y>=0)
		    printf("-%.3f %.3f\n",fabs(x),fabs(y));
		if (x>=0&&y<0)
		    printf("%.3f -%.3f\n",fabs(x),fabs(y));
		if (x>=0&&y>=0)
		    printf("%.3f %.3f\n",fabs(x),fabs(y));
	}
	return 0;	
}