Go: package main

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

func gcd(num1, num2 int) int {
	if num2 == 0 {
		return num1
	}
	num3 := num1 % num2
	return gcd(num2, num3)
}

func lcm(num1, num2 int) int {
	if num1%num2 != 0 {
		num3 := gcd(num1, num2)
		for i := 1; ; i++ {
			check := num3 * i
			if check%num1 == 0 && check%num2 == 0 {
				return check
			}
		}
	} else {
		return num1
	}
}

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]
		lcm := lcm(a, d)
		mulA := lcm / a
		mulD := lcm / d
		a *= mulA
		b *= mulA
		c *= mulA
		d *= mulD
		e *= mulD
		f *= mulD

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

		bE := b - e
		cF := c - f
		y := cF / bE
		x := (c - (y * b)) / a

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

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

int main(void) {
    double a, b, c, d, e, f;
    double x, y;
    
    while(cin >> a >> b >> c >> d >> e >> f) {
        y = (c*d - a*f) / (b*d - a*e);
        x = (c - b * y) / a;
        
        printf("%.3lf %.3lf", x, y);
        cout << endl;
    }
}

C++: #include <iostream>

using namespace std;

int main()
{
	int a,b,c,d,e,f;
	float x,y,dx,dy;
	while( cin >> a >> b >>c >>d >> e >> f ) {
		x = (c*e-b*f)/(float)(a*e-b*d);
		y = (c - a*x)/(float)b;
		
		x += 0.0005;
		y += 0.0005;

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



	return 0;
}

C++: #include <iomanip>
#include <utility>
#include <vector>
#include <math.h>
#include <algorithm>
#include <string>
#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)
	{
		b *= d; c *= d;
		e *= a; f *= a;
		b -= e; c -= f;
		y = c*1.0 / b;
		x = (f - e*y)*1.0 / (d*a);
		cout << fixed << setprecision(3) << x << " " << fixed << setprecision(3) << y << endl;
	}
	
	return 0;
}

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

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

C++: #include<iostream>
#include<algorithm>
#include<stdio.h>
using namespace std;
int main(){
	int a,b,c,d,e,f;
	int o,p,q,r,s,t;
	float x,y;
	while(scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f)!=EOF){
		o=a;p=b;q=c;r=d;s=e;t=f;
		o*=d;p*=d;q*=d;
		r*=a;s*=a;t*=a;
		//printf("%d %d %d %d %d %d \n",o,p,q,r,s,t);
		p-=s;
		q-=t;
		if(q==0){
			y=0.0;
		}
		else{
		y=(float)(q/p);
		}
		int g=(int)(e*y);
		g*=-1;
		if(f+g==0){
			x=0.0;
		}
		else{
			x=(float)((f+g)/d);
		}
		printf("%.3f %.3f\n",x,y);
	}
}

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

using namespace std;

int main() {

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

	cout << fixed << setprecision(3) << ((c*e-b*f)/(a*e-b*d))  << " " << (a*f-c*d)/((a*e-b*d)) << endl;
	
	}

	return 0;
}

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

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<0){
			d = -d;
			e = -e;
			f = -f;
		}

		x = (c - b*(c - f*a / d) / (b - e*a / d)) / a;
		y = (c - f*a / d) / (b - e*a / d);
		if (x == 0)x = 0;
		if (y == 0)y = 0;
		round(x, 4);
		round(y, 4);
		std::cout<<std::fixed<<std::setprecision(4)  << x << " " << y << std::endl;
	}
	return 0;
	
}

double    round(double src, int n){
	double dst;
	dst = src * pow(10, -n - 1);       
	dst = (double)(int)(dst + 0.5);
	return    dst * pow(10, n + 1);      
}

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

using namespace std;

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

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

using namespace std;

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

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

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

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

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

using namespace std;

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

    while (cin >> a >> b >> c >> d >> e >> f) {
        answer1 = static_cast<double>(e * c - b * f) / (a * e - b * d);
        answer2 = static_cast<double>(-d * c + a * f) / (a * e - b * d);
        cout << fixed << setprecision(3) << round(answer1) << " " << round(answer2) << endl;
    }
    
    return 0;
}

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

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);
	if(x == 0) x = 0.000;
	if(y == 0) y = 0.000;
	printf("%.3f %.3f\n",x,y);
    }
    return 0;
}

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

using namespace std;

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

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

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

int main() {
        int a, b, c, d, e, f;
        double x, y;
        char line[200];

        while(fgets(line, 200, stdin) != NULL) {
                sscanf(line, "%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f);
                x = ((double)e*c - b*f) / (a*e - d*b);
                y = ((double)a*f - d*c) / (a*e - d*b);
                x = ((int)(x * 1000 + 0.5)) / 1000.0;
                y = ((int)(y * 1000 + 0.5)) / 1000.0;
                printf("%.3f %.3f\n", x, y);
        }
}

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

int main()
{
    int a1, b1, c1, a2, b2, c2, d, dx, dy;
    while(cin >> a1 >> b1 >> c1 >> a2 >> b2 >> c2){
        d = a1*b2 - a2*b1;
        dx = c1*b2 - c2*b1;
        dy = a1*c2 - a2*c1;
        if(d != 0){
            float x = (float)dx/d;
            float y = (float)dy/d;
            if (x == 0.0) x = abs(x);
            if (y == 0.0) y = abs(y);
            cout <<fixed << setprecision(3)<< x <<' '<< y <<endl;
        }
    }
    return 0;
}