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<iostream>
#include<stdio.h>

int main(){
	int n;
	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%6.3f",x,y);

	
	return 0;
}

C++: while line = gets
  (a, b, c, d, e, f) = line.split(" ").map{|str|Integer str}
  z = a*e - b*d
  x = (c*e-f*b)/z + 0.000
  y = (f*a-c*d)/z + 0.000
  puts sprintf("%.3f %.3f", x, y)
end

C++: #include<bits/stdc++.h>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<algorithm>
using namespace std;



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

C++: #include <iostream>
#include <iomanip>
#include <stdlib.h>
using namespace std;
int main(){
	int a,b,c,d,e,f;
	while(cin >> a >> b >> c >> d >> e >> f){
		double x = double(c*e-f*b)/double(a*e-d*b);
		double y = double(c*d-f*a)/double(b*d-a*e);
		if(abs(x)<0.0001) x = abs(x);
		if(abs(y)<0.0001) y = abs(y);
		cout << fixed << setprecision(3) << x << " " << y << endl;
	}
}

C++: #include <cstdio>
#include <algorithm>
#include <iostream>
#include <vector>
#include <string>
#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);
		if(x==0){
			x=0;
		}
		y=(c*d-a*f)/(b*d-e*a);
		if(y==0){
			y=0;
		}
		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){
    x = (double) (c * e - b * f) / (a * e - b * d);
    y = (double) (c * d - a * f) / (b * d - a * e);
    printf("%.3lf %.3lf\n", x, y);
  }
}

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

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

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

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

#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define REP(i,n) for (int i=0;i<(n);i++)
#define ALL(a) (a).begin(),(a).end()
#define MIN(a,b) (a>b?b:a)
#define MAX(a,b) (a>b?a:b)

int main(void)
{
  double in[6];
  while (cin >> in[0]) {
    FOR(i,1,6) cin >> in[i];
    double x,y;
    y=(in[5]-in[2]*in[3]/in[0])/(in[4]-in[1]*in[3]/in[0]);
    x=(in[2]-in[1]*y)/in[0];
    x*=1000;
    x=round(x);
    x/=1000;
    y*=1000;
    y=round(y);
    y/=1000;
    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,x,y;
  while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) != EOF){
    x = (c-b*(c*d-a*f)/(b*d-a*e))/a; 
    y = (c*d-a*f)/(b*d-a*e);
    if(x == -0)x = 0;
    if(y == -0)y = 0;
    printf("%3f %3f",x,y);
  }
}

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

using namespace std;

typedef struct {
        double x1;
        double x2;
} answer;

answer solve_simultaneous_equations(double a, double b, double c, double d, double e, double f) {
        answer ans;
        ans.x1 = (c*e - b*f) / (a*e - b*d);
        ans.x2 = (c*d - a*f) / (b*d - a*e);
        return ans;
}

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

        while(cin >> a >> b >> c >> d >> e >> f) {
                answer ans;
                ans = solve_simultaneous_equations(a,b,c,d,e,f);
                cout << showpoint << fixed << setprecision(3) << ans.x1;
                cout << " ";
                cout << showpoint << fixed << setprecision(3) << ans.x2;
                cout << endl;
        }

        return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#define M_PI 3.14159265358979
#include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include<iomanip>
#include<vector>
#include<cmath>
#include <algorithm>

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);
	}
}

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