Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	for scanner.Scan() {
		strNums := strings.Fields(scanner.Text())
		nums := []int{}
		for _, strNum := range strNums {
			num, _ := strconv.Atoi(strNum)
			nums = append(nums, num)
		}
		a := nums[0]
		b := nums[1]
		c := nums[2]
		d := nums[3]
		e := nums[4]
		f := nums[5]
		var mulA, mulD int
		if a < 0 {
			mulA = a * -1
		} else {
			mulA = a
		}
		if d < 0 {
			mulD = d * -1
		} else {
			mulD = d
		}
		a *= mulD
		b *= mulD
		c *= mulD
		d *= mulA
		e *= mulA
		f *= mulA

		if d < 0 {
			d *= -1
			e *= -1
			f *= -1
		}

		bE := b - e
		cF := c - f
		if bE == 0 {
			bE = 1
		}
		y := cF / bE
		x := (c - (y * b)) / a

		fmt.Printf("%d.000 ", x)
		fmt.Printf("%d.000\n", y)
	}
}

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

using namespace std;

int main() {
    double a, b, c, d, e, f, x, y, det;
    while (true) {
        cin >> a >> b >> c >> d >> e >> f;
        if (cin.eof()) {
            return 0;
        }
        det = a*e-b*d;
        x = (c*e-b*f)/det;
        y = (a*f-c*d)/det;
        if (x < 0.0005) {
            x = 0;
        }
        if (y < 0.0005) {
            y = 0;
        }
        cout << std::fixed << setprecision(3) << x << ' ' << y << endl;
    }
}

C++: #include<bits/stdc++.h>
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 det = (a*e) - (b*d);
    double xx = (c*e) - (b*f);
    double yy = (a*f) - (c*d);
    double x = xx/det;
    double y = yy/det;
    long long x0 = x , y0 = y;
    if(x0 == 0 ) x = 0.000;
    else if(y0 == 0) y = 0.000;
    printf("%.3lf %.3lf\n",x,y);
}
return 0;
}

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

double x,y;
int a,b,c,d,e,f;
int sisya = 1000;


void setX() {
    int ae, bd, ce, bf;
    
    ae = a * e;
    bd = b * d;
    ce = c * e;
    bf = b * f;
    
    x = (ce - bf) / (ae - bd);
    x *= sisya;
    if(x > 0) x += 0.5;
    else x -= 0.5;
    x = int(x);
    x /= sisya;
}

void setY() {
    int ae, af, cd, bd;
    
    bd = b * d;
    ae = a * e;
    cd = c * d;
    af = a * f;
    
    y = (cd - af) / (bd - ae);
    y *= sisya;
    if(y > 0) y += 0.5;
    else y -= 0.5;
    y = int(y);
    y /= sisya;
    
}

int main(void) {
    
    while(cin >> a >> b >> c >> d >> e >> f) {
        setX();
        setY();
        cout << setprecision(3);
        cout << setiosflags(ios::fixed);
        cout << x << " " << y << endl;
    }
    return 0;
}