Go: package main

import "fmt"

func main() {
	var Xs, Ys []float32
	Xs = make([]float32, 0)
	Ys = make([]float32, 0)
	var cnt int
	for {
		var a, b, c, d, e, f, x, y float32
		fmt.Scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)
		if a == 0 {
			break
		}
		y = (((a * f) - (d * c)) / ((a * e) - (b * d)))
		x = ((c - (b * y)) / a)
		Xs = append(Xs, x)
		Ys = append(Ys, y)
		cnt++
	}
	for i := 0; i < cnt; i++ {
		fmt.Printf("%.3f %.3f\n", Xs[i], Ys[i])
	}
}

C++: #include<bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
typedef long long LL;
int main(){
        double a,b,c,d,e,f;
        while(cin>>a,cin>>b>>c>>d>>e>>f){
           cout<<setprecision(3)<<fixed<<(b*f-e*c)/(b*d-e*a)<<" "<<(a*f-d*c)/(a*e-d*b)<<endl;
        }
	return(0);
}

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

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

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

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);
		printf("%.3f %.3f\n", x + 0.0, y + 0.0);
	}
	return (0);
}

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

int main(){
	float a,b,c,d,e,f,x,y;
	
	scanf("%f%f%f%f%f%f",&a,&b,&c,&d,&e,&f);
	
	x=(c*e-b*f)/(a*e-b*d);
	y=(c*d-a*f)/(b*d-a*e);
	
	printf("%.3f %.3f",x,y);
	std::cout<<std::endl;
	
	
	return 0;
	
	}

C++: #include <stdio.h>

double sishagonyu(double num)	{
	
	//int num2;
	
	if (num == 0) return num;
	
	if (num > 0) { num += 0.0005; }
	else { num -= 0.0005; }
	
	num = (double)(int)(num * 1000) / 1000;
	
	//	num *= 1000;
	//	num2 = (int)num;
	//	num = num2;
	//	num /= 1000;
	
	return num;
}

int main() {
	
	//printf("%.3lf", sishagonyu((double)-0.0015));
	
	
	double a, b, c, d, e, f;
	double x, y;
	
	double n, m, h, i;
	
	while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF){
		
		//if (scanf("%lf %lf %lf %lf %lf %f", &a, &b, &c, &d, &e, &f) == EOF) break;
		
		//printf("input:\n%f %f %f\n%f %f %f\n", a, b, c, d, e, f);	//input
		
		if (a == 0) { y = c / b; }
		if (b == 0) { x = c / a; }
		if (d == 0) { y = f / e; }
		if (e == 0) { x = f / d; }
		
		n = a / d;
		
		//j = d * n;
		h = e * n;
		i = f * n;
		
		//printf("%f %f %f\t%f %f\t%f\n", a, b, c, h, i, n);
		
		m = b - h;
		y = c - i;
		//printf("%f %f\n", m, y);
		
		if(y <= 0.0004 && y >= -0.0005) { 
			
			//printf("y = 0\n");
			y = 0; 
			
		} else {
			
			y /= m;
			//printf("%f\n", y);
			
			i = c - (b * y);
			x = i / a;
			
			//printf("x = %f, y = %f\n", x, y);
			
			x = sishagonyu(x);
			y = sishagonyu(y);
			
		}
		//printf("%f %f\n", x, y);
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}
//2.2 3.3 22.24706 3.2 8.7 50.12932
//3.2777 4.5564

//1 2 3 4 5 6
//-1.000 2.000

//2 -1 -2 -1 -1 -5
//1.000 4.000

//2 -1 -3 1 -1 -3
//0.000 3.000

// 2 -1 -3 -9 9 27
// 0.000 3.000

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

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
    double a,b,c,d,e,f,g,h;
    while(cin>>a>>b>>c>>d>>e>>f){
            h=0;g=0;
    h=(d*c-a*f)/(b*d-a*e);
    g=(c-b*h)/a;
    printf("%.3lf %.3lf\n",g,h);
    }
    return 0;

}

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

using namespace std;

int main(){
  double a,b,c,d,e,f;
  vector<double> al,bl,cl,dl,el,fl;
  double x,y,n,m;

  while(cin >> a >> b >> c >> d >> e >> f){
    al.push_back(a);
    bl.push_back(b);
    cl.push_back(c);
    dl.push_back(d);
    el.push_back(e);
    fl.push_back(f);
  }

  for(int i=0; i<al.size(); i++){
    n = bl[i]/el[i];
    m = al[i]/dl[i];
    x = (cl[i]-n*fl[i])/(al[i]-n*dl[i]); 
    y = (cl[i]-m*fl[i])/(bl[i]-m*el[i]);
    printf("%0.3f %0.3f\n", x, y);
  }

  return 0;
}

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

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

C++: #include <cstdio>

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

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

	return 0;
}

C++: #include<stdio.h>
int main(){
	int X,Y;
double a,b,c,d,e,f,x,y;
double p[2][3]={0};
y=0;x=0;
while(scanf("%lf",&a)!=EOF&&scanf("%lf",&b)!=EOF&&scanf("%lf",&c)!=EOF&&scanf("%lf",&d)!=EOF&&scanf("%lf",&e)!=EOF&&scanf("%lf",&f)!=EOF){

y=(d*c-a*f)/(b*d-a*e);
x=(e*c-b*f)/(e*a-b*d);
X=x*10000;
Y=y*10000;
if((X)%10>=5)x+=0.0005;
else if((X)%10<=-5)x-=0.0005;
if((Y)%10>=5)y+=0.0005;
else if((Y)%10<=-5)y-=0.0005;

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

C++: #include <iostream>
#include <cstdio>
using namespace std;
int main( void )
{
	while ( !cin.eof() )
	{
		int a, b, c, d, e, f;
		cin >> a >> b >> c >> d >> e >> f;
		if ( cin.eof() )
			break;

		double delta = 1.0 / ( a*e - b*d );

		double x = (double)( e * c - b * f ) * delta;
		double y = (double)( a * f - d * c ) * delta;

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

	}
}

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

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

	while(cin >> a[cnt] >> b[cnt] >> c[cnt] >> d[cnt] >> e[cnt] >> f[cnt]) cnt++;

	for(int i=0; i<cnt; 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];
			}
		}
	}

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

	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define it ::iterator
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double ESP=1e-10;
using namespace std;
int main(){
  double a,b,c,d,e,f;
  while(cin>>a){
    cin>>b>>c>>d>>e>>f;
    double x=(c*e-b*f)/(a*e-b*d);
    double y=(f-d*x)/e;
    if(x==0)x=0;
    if(y==0)y=0;
    printf("%.5f %.5f\n",x,y);
  }
}

    
    /*
      ey=f-dx
      y=(f-dx)/e
      ax+b(f-dx)/e=c
      aex+df-bdx=ce
      (ae-bd)x=ce-df
      x=(ce-df)/(ae-bd)

  y=(f-dx)/e
  y=(f



a b  x  c
d e  y  f

x  c  e -b
y  f  -d a  /(ae-bd)*/

C++: #include <iostream>
#include <algorithm>
#include <string.h>
#include <math.h>
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 - e * a);
        x = (c - (b * y)) / a;
        printf("%.3lf %.3lf\n",x,y);
    }
    return 0;
}