Go: package main

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

func main() {
        var a, b, c, d, e, f float64
        sc := bufio.NewScanner(os.Stdin)
        for sc.Scan() {
                fmt.Sscanf(sc.Text(), "%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)

                det := a*e - b*d
                x := (e*c - b*f) / det
                y := (a*f - c*d) / det
                if x == 0.0 {
                        x = math.Abs(x)
                }
                if y == 0.0 {
                        y = math.Abs(y)
                }
                fmt.Printf("%.3f %.3f\n", x, y)
        }
}

C++: #include <functional>
#include <algorithm>
#include <iostream>
#include <sstream>
#include <cstring>
#include <iomanip>
#include <fstream>
#include <climits>
#include <cctype>
#include <cstdio>
#include <string>
#include <vector>
#include <bitset>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <deque>
#include <list>
#include <map>
#include <set>
using namespace std;

/*** typedef ***/
typedef long long LL;
typedef unsigned int ui;
typedef unsigned long long ULL;
typedef pair < int , int > ii;
typedef pair < LL  , LL  > ll;
typedef vector <int>  vint;
typedef vector <bool> vbool;
typedef vector <long> vlong;

/*** define ***/
#define sz(x)			((int)x.size())
#define tin(x)			scanf("%d",&x)
#define all(x)			x.begin(),x.end()
#define Set(b,a)		memset(b,a,sizeof b)
#define print1(x)		printf("Case %d:",x++)
#define tin2(x,y)		scanf("%d%d",&x,&y)
#define tin3(x,y,z)		scanf("%d%d%d",&x,&y,&z)
#define loop(i,i0,in)	for(int i=i0 ; i<in ; i++)
#define rep(i,n)		for(int i=0 ; i<(n) ; i++)
#define _rep(i,n)		for(int i=n-1 ; i>=0 ; i--)
#define _loop(i,in,i0)	for(int i=in-1 ; i>=i0 ; i--)
#define Fore(it, x)		for(typeof (x.begin()) it = x.begin(); it != x.end (); it++)

LL gcd(LL a,LL b)
{
	if(b==0)
		return a;
	return gcd(b,a%b);
}

LL lcm(LL a,LL b)
{
	return a*b/gcd(a,b);
}
     
int main()  
{  
#ifdef Online_Judge
	freopen("a.in","r",stdin);
#endif
	int a,b,c,d,e,f;
	while(cin >> a >> b >> c >> d >> e >> f)
	{
		double x=((f*b)-(e*c))/((b*d)-(e*a));
		double y=((f*a)-(d*c))/((a*e)-(d*b));
		//cout << x << ' ' << y << endl;
		printf("%.3f %.3f\n",x,y);
	}
	return 0;
}

C++: using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication3
{
    class Program
    {
        static void Main(string[] args)
        {
            while (true)
            {
                double x, y;
                double[] h = new double[6];
                String str = Console.ReadLine();
                if (str == null) break;
                string[] s = str.Split();
                for (int i = 0; i < 6; i++)
                {
                    h[i] = double.Parse(s[i]);
               
                x = ((h[2] * h[4]) - (h[1] * h[5])) / ((h[0] * h[4]) - (h[1] * h[3]));
                y = ((h[2] * h[3]) - (h[0] * h[5])) / ((h[3] * h[1]) - (h[0] * h[4]));
                x = Math.Floor(x * 1000) / 1000;
                y = Math.Floor(y * 1000) / 1000;
                Console.WriteLine("{0:0.000} {1:0.000}", x, y);

            }
        }
    }
}

C++: #include<iostream>
#include<iomanip>
using namespace std;
int main()
{
	double line[6];
	double anx,any;
	for(int ii=0;ii<2;++ii)
	{
		for(int i=0;i<6;++i)
		{
			cin>>line[i];
		}
		double doll;
		doll=line[0];
		for(int i3=0;i3<3;++i3)
		{
			line[i3]*=line[3];
		}
		for(int i3=3;i3<6;++i3)
		{
			line[i3]*=doll;
		}
		double bu[3];
		for(int i4=0;i4<3;++i4)
		{
			bu[i4]=line[i4];
			line[i4]-=line[i4+3];
		}
		any=line[2]/line[1];
		anx=(bu[2]-bu[1]*any)/bu[0];
		if(anx==0){
			anx=0;
		}
		if(any==0){
			any=0;
		}
		cout<<fixed << setprecision(4)<<anx<<" "<<any<<endl;
	}
	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 = (e*c - b*f) / (e*a - d*b);
        double y = (a*f - d*c) / (e*a - d*b);
        cout << fixed << setprecision(3) << x << " " << y << endl;
    }

    return 0;
}

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

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

	float det = a*e-b*d;
	float x = 1/det*(c*e - b*f);
	float y = 1/det*(-c*d + a*f);	
	if(x < 0.0000001) x = 0;
	if(y < 0.0000001) y = 0;

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

	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("%.9lf %.9lf\n",x,y);
	}
}

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

int main() {
	double a, b, c, d, e, f, x, y, o, p;
	while (cin >> a) {
		cin >> b >> c >> d >> e >> f;
		b *= d;
		c *= d;
		e *= a;
		f *= a;
		o = b - e;
		p = c - f;
		y = p / o;
		x = (c - b*y) / (a*d);
		printf("%.3f %.3f", 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){
		x = (c*e - b*f)/(double)(a*e - b*d);
		y = (c*d - a*f)/(double)(b*d - a*e);

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

	return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <algorithm>

using namespace std;

int main()
{
	int a[1000],b[1000],c[1000],d[1000],e[1000],f[1000];
	float x[1000],y[1000];
	int len=0;
	while (cin >> a[len] >> b[len] >> c[len] >> d[len] >> e[len] >> f[len])
		len++;

	for (int i=0; i < len; i++) {
		x[i] =  ((e[i] * c[i] - b[i] * f[i]) / (e[i] * a[i] - b[i] * d[i]));
		y[i] =  ((c[i] * d[i] - f[i] * a[i]) / (b[i] * d[i] - a[i] * e[i]));
	}
	for (int i=0; i < len; i++) {
		printf("%.3lf %.3lf\n",x[i],y[i]);
	}
	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<cmath>
#include<cstdio>
using namespace std;
int main(){
	double a,b,c,d,e,f,n[20];
	while(cin>>a>>b>>c>>d>>e>>f){
	double x,y;
	int w;
	if(a == 0){
		n[0] = 0;
		n[1] = 0;
	}else{
		n[0] = c / a;
		n[1] = b / a;
	}
	if(d == 0){
		n[2] = 0;
		n[3] = 0;
	}else{
		n[2] = f / d;
		n[3] = e / d;
	}
	if(b == 0){
		n[4] = 0;
		n[5] = 0;
	}else{
		n[4] = c / b;
		n[5] = a / b;
	}
	if(e == 0){
		n[6] = 0;
		n[7] = 0;
	}else{
		n[6] = f / e;
		n[7] = d / e;
	}
	if(n[1] - n[3] == 0){
		y = 0;
	}else{
		y = (n[0] - n[2]) / (n[1] - n[3]);
	}
	if(n[5] - n[7] == 0){
		x = 0;
	}else{
		x = (n[4] - n[6]) / (n[5] - n[7]);
	}
	x = x * pow(10, - 5);
	double xx = x + 0.5;
	xx = xx * pow(10,5);
	y = y * pow(10, - 5);
	double yy = y + 0.5;
	yy = yy * pow(10,5);

	printf("%0.3f,%0.3f\n",&xx,&yy);



}
return 0;
}