Go: package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)
	for {
		data := nextInts(6)
		if data[0] == 0 || data[1] == 0 || data[2] == 0 || data[3] == 0 || data[4] == 0 || data[5] == 0 {
			break
		}
		fmt.Printf("%.3f\n", Round(GetX(data[0], data[1], data[2], data[3], data[4], data[5]), 3))
		fmt.Printf("%.3f\n", Round(GetY(data[0], data[1], data[2], data[3], data[4], data[5]), 3))
	}
}

func GetX(a, b, c, d, e, f float64) float64 {
	return ((c * e) - (b * f)) / ((a * e) - (b * d))
}

func GetY(a, b, c, d, e, f float64) float64 {
	return ((c * d) - (a * f)) / ((b * d) - (a * e))
}

func Round(f float64, places int) float64 {
	shift := math.Pow(10, float64(places))
	return math.Floor(f*shift+.5) / shift
}

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() float64 {
	a, _ := strconv.Atoi(next())
	return float64(a)
}

func nextInts(n int) []float64 {
	a := make([]float64, n)
	for i := 0; i < n; i++ {
		a[i] = nextInt()
	}
	return a
}

C++: #include<bits/stdc++.h>
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
#define pb push_back
int dy[]={0, 0, 1, -1, 0};
int dx[]={1, -1, 0, 0, 0};
 
#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--)

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

    while(scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f) != EOF){
        double x = (c * e - b * f) / (double)(a * e - b * d);
        double y = (a * f - c * d) / (double)(a * e - b * d);

        if(-1e-3 < x && x < 1e-3)
            x = 0.0;
        if(-1e-3 < y && y < 1e-3)
            y = 0.0;
        printf("%0.3lf %0.3lf\n",x,y);
    }
    return 0;
}

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

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

using namespace std;
double round(double value);

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]);
    */
    y = (cl[i]*dl[i]-al[i]*fl[i])/(bl[i]*dl[i]-el[i]*al[i]);
    x = (cl[i] - ( bl[i] * y)) /al[i];
    printf("%0.3f %0.3f\n", x,y);
  }

  return 0;
}


double round(double value){
  return floor(value*1000 + 0.5)/1000;
}

C++: #include <cstdio>

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

C++: #include <bits/stdc++.h>
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=round((c*e-b*f)/(a*e-b*d)*1000)/1000;
        double y=round((a*f-c*d)/(a*e-b*d)*1000)/1000;
        if (x==-0)
            x=0;
        if (y==-0)
            y=0;
        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;

	while(cin >> a >> b >> c >> d >> e >> f){

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

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

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

using namespace std;

int main(int argc, char *argv[]) {
  double a, b, c, d, e, f;

  while (true) {
    cin >> a >> b >> c >> d >> e >> f;
    if (cin.eof())
      break;
    a -= d * b / e;
    c -= f * b / e;
    double x = c / a;
    if (x >= 0)
      x = (int)(x * 1000 + 0.5);
    else
      x = (int)(x * 1000 - 0.5);
    x /= 1000;
    double y = (f - d * x) / e;
    if (y >= 0)
      y = (int)(y * 1000 + 0.5);
    else
      x = (int)(y * 1000 - 0.5);
    y /= 1000;
    printf("%.3lf %.3lf\n", x, y);
  }
  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("%.3lf %.3lf\n",x,y);
	}
}

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

int main(void){
	double x1,y1;
	int a=0,b=0,c=0,d=0,e=0,f=0,x2,y2;
    
    while(scanf("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f) != EOF)
	{
	    x2 = (c * e -b * f) / (a * e - b * d)*1000+0.5;
	    y2 = (a * f -d * c) / (a * e - b * d)*1000+0.5;

		x1 = x2/1000;
		y1 = y2/1000;
		printf("%lf %lf\n",x1,y1);
	}
  return 0;
}

C++: #include<stdio.h>

int main()
{
    int a, b, c, d, e, f;
    while (scanf("%d", &a) != EOF) {
        scanf("%d", &b);
        scanf("%d", &c);
        scanf("%d", &d);
        scanf("%d", &e);
        scanf("%d", &f);
        printf("%f ", (double) (c*e - b*f) / (a*e - b*d ));
        printf("%f\n", (double) (- c*d + a*f) / (a*e - b*d ));
        
    }
    return 0;
}

C++: #include <stdio.h>

int main() {
    float a, b, c, d, e, f;
    while(scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f) != EOF) {
        float det = a*e - b*d;
        float x = (c*e-b*f)/det;
        float y = (-c*d+a*f)/det;
        x = x==-0.0f?0.0f:x;
        y = y==-0.0f?0.0f:y;
        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= (c*d-a*f)/(b*d-a*e);
		cout<<setprecision(3)<<fixed;
		cout<<x<<" "<<y<<endl;
	}
	return 0;
}

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

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

return 0;
}

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

using namespace std;

int main ()
{
    double a, b, c, d, e, f, 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);
        x = round(x * 1000) / 1000;
        y = round(y * 1000) / 1000;
        if(fabs(x) < 1e-8) x = 0;
        if(fabs(y) < 1e-8) y = 0;
        printf("%.3f %.3f\n", 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){
     if(b*d - a*e != 0)
        x = (c*e - b*f)/(a*e - b*d);
        y = (c*d - a*f)/(b*d - a*e);
         printf("%.3f %.3f",x,y);
    }
    return 0;
}

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

int main() {
  std::cin.tie(0);
  std::ios::sync_with_stdio(false);

  double a, b, c, d, e, f;

  while (cin >> a, cin >> b, cin >> c, cin >> d, cin >> e, cin >> f) {
    printf("%.3f %.3f\n", (c * e - f * b) / (a * e - d * b) + 0, (c * d - f * a) / (b * d - e * a) + 0);
  }

  return 0;
}