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)
		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<iomanip>
using namespace std;

int main()
{
	double a, b, c, d, e, f;
	while(cin>>a>>b>>c>>d>>e>>f){     
	  cout<<fixed<<setprecision(4);
	  cout <<(e*c - b*f) / (a*e - b*d) << " " << (a*f - d*c) / (a*e - b*d) << endl;
	}

    return 0;
}

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

C++: #include <iostream>
#include <cstdio>
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);
   printf("%.3lf %.3lf\n",x,y);
	}
}

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

int main(){
	cout << setprecision(3) << setiosflags(ios::fixed);
	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);
		if (x == 0.000) x += 0.000;
		y = (c*d-f*a)/(b*d-a*e);
		if (y == 0.000 )y += 0.000;

		cout << x << ' ' << y << endl;
	}
	return 0;
}

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

int main(void){
	double x=0,y=0;
	int a=0,b=0,c=0,d=0,e=0,f=0,i=0,j;
    
    while(scanf("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f) != EOF)
	{
		x = (c * e -b * f) / (a * e - b * d);
	    y = (c - a * x) / b;

		printf("%.3lf %.3lf\n",x,y);
	}
  return 0;
}

C++: #include <iostream>

using namespace std;

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

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

void calc(std::vector<double> first, std::vector<double> second) {
    double div;

    div = second[0] / first[0];
    second[1] -= first[1] * div;
    second[2] -= first[2] * div;
    second[2] /= second[1];

    first[2] -= first[1] * second[2];
    first[2] /= first[0];

    std::cout << std::fixed << std::setprecision(3) << first[2] << " " << second[2] << std::endl;
    return;
}

int main(void) {
    std::vector<double> first(3, 0);
    std::vector<double> second(3, 0);
    while(std::cin >> first[0]) {
        for (int i = 1; i < 3; i++) {
            std::cin >> first[i];
        }
        for (int i = 0; i < 3; i++) {
            std::cin >> second[i];
        } 
        calc(first, second);
    }
    return 0;
}

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) {
        double x = 0.0;
        if (c*e - b*f != 0)
            x = static_cast<double>(c*e - b*f) / (a*e - b*d);
        double y = 0.0;
        if (a*f - c*d != 0)
            y = static_cast<double>(a*f - c*d) / (a*e - b*d);
        cout << fixed << setprecision(3);
        cout << x << " " << y << endl;
    }
}

C++: #include <stdio.h>

main() {
  double a,b,c,d,e,f;
  double x,y;
  while(scanf("%lf %lf %lf",&a,&b,&c)) {
    scanf("%lf %lf %lf",&d,&e,&f);
    b/=a; c/=a; a=1; a*=d; b*=d; c*=d;
    a=0; b-=e; c-=f; c/=b;

    e/=d; f/=d; d=1; f = f-e*c;
    //printf("%lf %lf %lf %lf %lf %lf\n",a,b,c,d,e,f);
    printf("%.3lf %.3lf\n",f,c);
  }
}

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

double round(double src,int n);

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

    while(cin>>a>>b>>c>>d>>e>>f){
        double x = (b*f-c*e)/(b*d-a*e);
        double y = (a*f-c*d)/(a*e-b*d);
        x = round(x,4);
        y = round(y,4);

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

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

C++: #define _USE_MATH_DEFINES

#include <iostream>
#include <string>
#include <iomanip>
#include <cmath>
#include <algorithm>
#include <utility>
#include <vector>
#include <numeric>

using namespace std;

template<typename T> void simultaneous_equation(T &x, T &y, T a, T b, T c, T d, T e, T f)
{
	if (a == 0 || b == 0 || d == 0 || e == 0)
	{
		if (a == 0)
		{
			y = c / b;
			x = (f - e * y) / d;
		}
		else if (b == 0)
		{
			x = c / a;
			y = (f - d * x) / e;
		}

		if (d == 0)
		{
			y = f / e;
			x = (c - b * y) / a;
		}
		else if (e == 0)
		{
			x = f / d;
			y = (c - a * x) / b;
		}
	}
	else
	{
		double a0 = a * e;
		double c0 = c * e;

		double d0 = d * b;
		double f0 = f * b;

		x = (f0 - c0) / (d0 - a0);

		y = (c - a * x) / b;
	}
}

int main()
{
	double a, b, c, d, e, f;
	for (; cin >> a >> b >> c >> d >> e >> f;)
	{
		double x, y;

		simultaneous_equation(x, y, a, b, c, d, e, f);
		cout << fixed << setprecision(3) << x + 0 << " " << y + 0 << endl;
	}
}

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

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

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