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>

#define times(n, i) uptil(0, n, i)
#define upto(f, t, i) for(auto _##i = (t), i = decltype(_##i)(f) poi i <= _##i poi i++)
#define uptil(f, t, i) for(auto _##i = (t), i = decltype(_##i)(f) poi i < _##i poi i++)
#define downto(f, t, i) for(auto i = (f), _##i = decltype(i)(t) poi i >= _##i poi i--)
#define downtil(f, t, i) for(auto i = (f), _##i = decltype(i)(t) poi i > _##i poi i--)

#define unless(c) if(!(c))
#define until(c) while(!(c))
#define loop while(true)

#define poi ;
#define poipoi << "\n"

using namespace std;

template<class T> T lov_yet(T t){
    if(t) return t poi
    else return 0 poi
}

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

C++: #include<iostream>
#include<iomanip>
using namespace std;
int main()
{
	int man(int x, int y);
	double b, c, e, f, x, y, z, k, l;
	
	double a, d;
	while (cin >> a >> b >> c >> d >> e >> f&&a != 0 && b != 0 && c != 0 && d != 0 && e != 0 && f != 0)
	{
		double s = b, v = c;
		b *= d;
		c *= d;
		e *= a;
		f *= a;
		b = b - e;
		c = c - f;
		k = c / b;
		l = (v - s*k) / a;
		cout << setiosflags(ios::fixed) << setprecision(4);
		cout << l << ' ' << k << endl;
	}
	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 <bits/stdc++.h>
using namespace std;

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

C++: #define scanf_s scanf
#include <stdio.h>
#include <iostream>
using namespace std;
#define MAX 200
int main(void)
{
	double a, b, c, d, e, f, x, y;
	while (scanf_s("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF) {
		x = 0; y = 0;
		if ((e * c - b * f) != 0 && (e * a - b * d) != 0)
			x = (e * c - b * f) / (e * a - b * d);
		if((d * c - a * f) != 0 &&  (d * b - a * e) != 0)
			y = (d * c - a * f) / (d * b - a * e);
		printf("%.3f %.3f\n", x, y);
	}
}

C++: #include <iostream>
#include <iomanip>
#include <math.h>

int main() {
  float a,b,c,d,e,f;
  float x,y;
  while(std::cin >> a >> b >> c >> d >> e >> f) {

    if(a >= d && fmodf(a, d) == 0) {
      y = (c - (f * (a / d))) / (b - (e * (a / d)));
      x = (c - (b * y)) / a;
    }
    else if(a < d && fmodf(d, a) == 0) {
      y = (f - (c * (d / a))) / (e - (b * (d / a)));
      x = (c - (b * y)) / a;
    }
    else if(b >= e && fmodf(b, e) == 0) {
      x = (c - (f * (b / e))) / (a - (d * (b / e)));
      y = (c - (a * x)) / b;
    }
    else if(b < e && fmodf(e, b) == 0) {
      x = (f - (c * (e / b))) / (d - (a * (e / b)));
      y = (c - (a * x)) / b;
    }
    else {}

    std::cout << std::fixed << std::setprecision(3) << x << " " << y << std::endl;
  }

  return 0;
}

C++: //http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0004
#include <iostream>
#include <iomanip>
#include <cstdio>
using namespace std;

double zc(double n) {
	if (-0.000000001<n&&n <= 0) return 0;
	else return n;
}

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

}

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

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

	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(12);
  double a, b, c, d, e, f, x, y;
  while (cin >> a >> b >> c >> d >> e >> f) {
    if (b * e - e * b) {
      x = (c * e + f * b) / (a * e - d * b);
    } else {
      x = (c * e - f * b) / (a * e - d * b);
    }
    y = (c - a * x) / b;
    cout << x << ' ' << y << '\n';
  }
  return 0;
}

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

int main() {
  for(double a, b, c, d, e, f; scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f) != EOF; ) {
    double det = a * e - b * d;
    double x = (e * c - b * f) / det;
    double y = (-d * c + a * f) / det;
    printf("%.4f %.4f\n", x + 1e-8, y + 1e-8);
  }
}

C++: #include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <math.h>
#include <map>
#include <vector>

using namespace std;



int main()
{
	double a, b, c, d, e, f;
	double x, y;
	
	while (cin >> a >> b >> c >> d >> e >> f)
	{
		x = (b*f - e*c) / (b*d - a*e);
		y = (a*f - c*d) / (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>
#include <stdio.h>

using namespace std;

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

C++: #include<cstdio>
using namespace std;
int main(void){
	int a,b,c,d,p,q;
	double x,y;
	while(scanf("%d%d%d%d%d%d",&a,&b,&p,&c,&d,&q)!=EOF){
		x=(double)(d*p-b*q)/(a*d-b*c);
		y=(double)(c*p-a*q)/(b*c-a*d);
		if(-0.001<x&&x<0.001)	x=0;
		if(-0.001<y&&y<0.001)	y=0;
		printf("%.3lf %.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)!=-1){
		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.000000){
			x = 0.000000;
		}
		if(y==-0.000000){
			y = 0.000000;
		}
		printf("%0.3f %0.3f\n",x,y);
	}
	
	
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#define EPS 1e-10
using namespace std;

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

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

int main()
{
    int a,b,c,d,e,f;
    double x,y;
    while(cin>>a>>b>>c>>d>>e>>f){
        double l,m,n;
        l=a/d;
        m=b-e*l;
        n=c-f*l;
        y=n/m;
        x=(c-by)/a;
        cout<<x<<" "<<y<<endl;
    }
    return 0;
}