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("%.3f %.3f\n", x, y)
        }
}

C++: #include <iostream>
#include <cstdio>
#ifndef repeat
#define repeat(i,n) for (int i = 0; i < (n); ++i)
#endif
#ifndef repeat_from
#define repeat_from(i,m,n) for (int i = (m); i < (n); ++i)
#endif
#ifndef repeat_one
#define repeat_one(i,n) for (int i = 1; i <= (n); ++i)
#endif
#ifndef repeat_rev
#define repeat_rev(i,n) for (int i = (n)-1; 0 <= i; --i)
#endif
#ifndef foreach
#define foreach(it, cont) for (typeof(cont.begin()) it = cont.begin(); it != cont.end(); ++it)
#endif
#include <vector>
#include <cmath>
#ifndef repeat
#define repeat(i,n) for (int i = 0; i < (n); ++i)
#endif
#ifndef repeat_from
#define repeat_from(i,m,n) for (int i = (m); i < (n); ++i)
#endif
#ifndef repeat_one
#define repeat_one(i,n) for (int i = 1; i <= (n); ++i)
#endif
#ifndef repeat_rev
#define repeat_rev(i,n) for (int i = (n)-1; 0 <= i; --i)
#endif
#ifndef foreach
#define foreach(it, cont) for (typeof(cont.begin()) it = cont.begin(); it != cont.end(); ++it)
#endif
#ifndef LIB_DEBUG_HPP
#define LIB_DEBUG_HPP
#ifdef DEBUG
#include <cassert>
#define debug(a) a
#else
#define debug(a)
#endif
#endif
#include <iostream>

// a11x1 + a12x2 + ... + a1m-1xm-1 = a1m
// a21x1 + a22x2 + ... + a2m-1xm-1 = a2m
//      ...        ...            ...
// an1x1 + an2x2 + ... + anm-1xm-1 = anm
std::vector<double> gaussian_elim(std::vector<std::vector<double> > a) {
    const int n = a.size();
#ifdef DEBUG
    assert (0 < n);
#endif
    const int m = a[0].size();
#ifdef DEBUG
    repeat (i, n) assert ((int)a[i].size() == m);
    assert (n == m-1);
#endif
    // make an upper diagonal matrix
    repeat (i, n) {
        {
            int pivot = -1;
            repeat_from (j, i, n) {
                const double eps = 1e-16;
                if (eps < std::abs(a[j][i])) { pivot = j; break; }
            }
#ifdef debug
            assert (pivot != -1);
#endif
            if (pivot != i) std::swap(a[i], a[pivot]);
        }
        repeat_from (j, i+1, m) a[i][j] /= a[i][i];
        a[i][i] = 1;
        repeat_from (j, i+1, n) {
            repeat_from (k, i+1, m) {
                a[j][k] -= a[j][i] * a[i][k];
            }
            a[j][i] = 0;
        }
    }
    // gather the solutions
    std::vector<double> result(n);
    repeat_rev (i, n) {
        result[i] = a[i][m-1];
        repeat_from (j, i+1, n) {
            result[i] -= a[i][j] * result[j];
        }
    }
    return result;
}
using namespace std;
int main() {
    // ax + by = c
    // dx + ey = f
    vector<vector<double> > v(2, vector<double>(3));
    vector<double> w;
    while (true) {
        repeat (i,2) repeat (j,3) cin >> v[i][j];
        if (cin.fail()) break;
        w = gaussian_elim(v);
        printf("%.3lf %.3lf\n", w[0], w[1]);
    }
    return 0;
}

C++: #include <cstdio>

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

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <algorithm>
#include <string>
#include <set>
#include <map>
#include <queue>
using namespace std;
typedef long long int ll;
const int INF = 100000000;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
int main(){
    for(double a1, a2, b1, b2, c1, c2;cin >> a1 >> b1 >> c1 >> a2 >> b2 >> c2;){
        double x, y;
        bool swp = false;
        b2 -= b1 * (a2 / a1);
        c2 -= c1 * (a2 / a1);
        y = c2 / b2;
        x = (c1 - y * b1) / a1;
        printf("%.3f %.3f\n", x, y);
    }
    return 0;   
}

C++: #include<iostream>
int main(){for(float a,b,c,d,e,f,x,y;;printf("%.3f %.3f\n",x,y)){if((std::cin>>a>>b>>c>>d>>e>>f).eof())break;y=(c*d-a*f)/(b*d-a*e);x=d?f/d-e*y/d:c/a-b*y/a;}}

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

using namespace std;

int main(){
 double x,y,a,b,c,d,e,f;
 while(cin>>a>>b>>c>>d>>e>>f){
  x=(c*e-f*b)/(a*e-d*b);
  y=(a*f-d*c)/(a*e-d*b);
  if(abs(x)<=(0.0+numeric_limits<double>::epsilon())) x = +0.00000000;
  if(abs(y)<=(0.0+numeric_limits<double>::epsilon())) y = +0.00000000;
  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;
	cout << showpoint << setprecision(3);
	while (cin >> a >> b >> c >> d >> e >> f){
		double x = ((double)(b*f - c*e)) / (double)(b*d - a*e);
		double y = ((double)(c*d - a*f)) / (double)(b*d - a*e);
		cout << x << ' ' << y << "\n";
	}
	cout.flush();
}

C++: ///BISMILLAHIR RAHMANIR RAHMIM
#include <bits/stdc++.h>
using namespace std;

int main ()
{
    ///freopen("input.txt","r",stdin);
    ///ios_base::sync_with_stdio(0);
    ///cin.tie(0);
    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=(c*e-b*f)/(a*e-b*d);
        y=(a*f-c*d)/(a*e-b*d);
        if (x==0.000 && y!=0.000)
            printf("0.000 %.3lf\n",y);
        else if(x!=0.000 && y==0.000)
            printf("%.3lf %0.000\n",x);
        else
            printf("%.3lf %.3lf\n",x,y);
    return 0;
}
}

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

C++: //08
#include<iostream>
#include<iomanip>

using namespace std;

int main(){
  for(double a,b,c,d,e,f;cin>>a>>b>>c>>d>>e>>f;){
    double x=(c*e-f*b)/(a*e-d*b);
    cout<<fixed<<setprecision(3)<<x<<' '<<(f-d*x)/e<<endl;
  }
  return 0;
}

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

using namespace std;

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

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

int main(){
	double a,b,c,d,e,f;
	double x[200],y[200];
	int cor = 0;
	while(scanf("%lf",&a) != EOF){
		scanf("%lf%lf%lf%lf%lf",&b,&c,&d,&e,&f);
		double det;
		det = a*e-b*d;
		x[cor] = (e*c-b*f)/det;
		y[cor] = (-d*c+a*f)/det;
		cor++;
	}
	for(int i = 0;i < cor;i++){
		printf("%.3lf %.3lf\n",x[i],y[i]);
	}
	return 0;
}

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

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

	while (cin >> a >> b >> c >> d >> e >> f) {
		if (a == 0) {
			x = 0;
			y = c / b;
		}else if (b == 0) {
			x = c / a;
			y = 0;
		}else {
			x = (c * e - b * f) / (a * e - b * d);
			if (0 == x) { x = 0; }
			y = (c - a * x) / b;
		}
		cout << fixed << setprecision(3) << x << ' ' << y << endl;
	}
    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  double a, b, c, d, e, f;
  double x, y;
  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 << x << " " << y << endl;
  return 0;
}