Go: package main

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

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
                fmt.Printf("%04f %04f\n", x, y)
        }
}

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

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

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

int main()
{ 
	double x1, x2, y1, y2, z1, z2;
	double x, y;
	while (cin >> x1 >> y1 >> z1 >> x2 >> y2 >> z2) {//係数値を入力している。
		double tmp = x1;
		x1 *= x2; y1 *= x2; z1 *= x2;//xの係数で連立する。
		x2 *= tmp; y2 *= tmp; z2 *= tmp;
		y = (z1 - z2) / (y1 - y2);//ｙを計算する。
		if (z1 - z2 == 0)y = 0;//-0.000にならないようにしている。
		x = (z1 - (y1*y)) / x1;//xの計算
		if (z1 - (y1*y) == 0)x = 0;//-0.000にならないようにしている。
		int a, b;
		a = x * 10000;//小数第4桁の四捨五入
		if (a % 10 > 4) {
			a += 10;
			x = double(a) / 10000;
		}
		b = y * 10000;//小数第4桁の四捨五入
		if (b % 10 > 4) {
			b += 10;
			y = double(b) / 10000;
		}
		cout << fixed;//小数第4桁までを出力したい
		cout << setprecision(3) << x << ' ' << y << endl;

	}
	return 0;
}

C++: #include <iostream>
#include <iomanip>
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=(c*d-a*f)/(b*d-e*a);
    cout<<fixed<<setprecision(3)<<x<<" "<<y<<endl;
  }
  return 0;
}

C++: #include<map>
#include<set>
#include<list>
#include<cmath>
#include<queue>
#include<stack>
#include<cstdio>
#include<string>
#include<vector>
#include<complex>
#include<cstdlib>
#include<cstring>
#include<climits>
#include<numeric>
#include<sstream>
#include<iostream>
#include<algorithm>
#include<functional>

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 = (c-a*x)/b;
		printf("%.3lf %.3lf\n",x,y);
	}
}

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

int main(){

	float a, b, c, d, e, f;

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

		float det = a * e - b * d;

		float dx = c * e - b * f;
		float dy = a * f - c * d;

		float x = dx / det;
		float y = dy / det;

		cout << fixed << setprecision(4) << x << " " << y << endl;
	}

	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <set>
#include <map>
#include <list>
#include <iterator>
#include <queue>
#include <stack>
#include <deque>
#include <sstream>
#include <algorithm>
#include <numeric>
#include <string>
#include <cmath>
#include <complex>
#include <functional>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cassert>
#include <cstdlib>
#include <cctype>

#define REP(i,m,n) for(int i=m;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define rp(i,c) rep(i,(int)c.size())
#define fr(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define mp make_pair
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define rall(u) (u).rbegin(),(u).rend()
#define dbg(x) cerr<<#x<<" = "<<(x)<<endl
#define v_delete(a,b) (a).erase(remove((a).begin(), (a).end(), b), (a).end())
#define v_unique(a) (a).erase(unique((a).begin(), (a).end()), (a).end())
#define VV(T) vector<vector< T > >
#define init(a,b) memset((a), (b), sizeof((a)))
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
const int inf=1<<28;
const double INF=1e10,EPS=1e-9;


template<class T>int SIZE(T a){return a.size();}
template<class T>string IntToString(T num){string res;stringstream ss;ss<<num;return ss.str();}
template<class T>T StringToInt(string str){T res=0;for(int i=0;i<SIZE(str);i++)res=(res*10+str[i]-'0');return res;}
template<class T>T gcd(T a,T b){if(b==0)return a;return gcd(b,a%b);}
template<class T>T lcm(T a,T b){return a/gcd(a,b)*b;}

template <class T> void input(T& a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
template <class T> void input(T* a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
typedef pair<int,int> pii;

inline bool IN(int x, int y, int w, int h)
{
    return 0 <= x && x < w && 0 <= y && y < h;
}


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

	return 0;
}

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

int main(void)
{
	// ax+by=c,dx+ey=f => ax+by=c,-(a/d)*dx+-(a/d)*ey=-(a/d)*f => ax+by=c,-ax-aey/d=-af/d => by-aey/d=c-af/d => (b-ae/d)y = c-af/d => y=(c-af/d)/(b-ae/d)
	// ax+by=c, ax=c-by, x=(c-by)/a
	
	signed int a, b, c, d, e, f;
	double x, y;
	
	do
	{
		if(std::cin >> a, !std::cin) break;
		std::cin >> b >> c >> d >> e >> f;
		y = (c-a*f/d)/(double)(b-a*e/d);
		x = (c-b*y)/(double)a;
		printf("%.3lf %.3lf\n", x, y);
	} while(true);

	return 0;
}

C++: #include <iostream>
#include <iomanip>
int main()
{
  int a, b, c, d, e, f;
  while (std::cin >> a >> b >> c >> d >> e >> f) {
    double x, y, r;
    r = static_cast<double>(a * e - b * d);
    x = static_cast<double>(c * e - b * f) / r;
    y = static_cast<double>(a * f - c * d) / r;
    std::cout << std::fixed << std::setprecision(3) << x << " " << y << std::endl;
  }
  return 0;
}

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

int main(int argc, char const *argv[]) {
  double x, y;
  double a, b, c, d, e, f;
  while (!(cin >> a >> b >> c >> d >> e >> f).eof()) {
    x = (e * c - b * f) / (a * e - b * d);
    y = (a * f - c * d) / (a * e - b * d);
    std::cout << fixed << setprecision(3) << x << " " << y << '\n';
  }
  return 0;
}

C++: #include<cstdio>
#include<iostream>
using namespace std;
int main(){

  double a,b,c,d,e,f;
  double x,y;

  while(cin >> a){
    cin >> b >> c >> d >> e >> f;
    
    if((a*e-d*b) == 0) x = 0;
    else x = (c*e-f*b)/(a*e-d*b);
    if((b*d-e*a) == 0) y = 0;
    else y = (c*d-f*a)/(b*d-e*a);

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

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

static int N = 2;
int pivot;


int main(){
    int i, j, k, n;
  
    // ?????§?????°?????? M
    double M[N][N + 1];
    for (int i = 0; i < N; ++i){
        for(int j= 0; j < N+1; ++j){
            cin >> M[i][j];
        }
    }
    
  

 
    double pivot, mul;
 
    // ????§??????????1??§??£????????????????????????????????????(???????¶????)
    for (i = 0; i < N; ++i){
        // ????§??????????????????????????????§??????????????£??????
        pivot = M[i][i];
        for (j = 0; j < N + 1; ++j){
           M[i][j] = (1 / pivot) * M[i][j];
        }
 
    // ???????????????????????????????????¨?????????????????????????????????
    // i??????????????????0???????????????????????¬?????¢?????????
         for (k = i + 1; k < N; ++k){
            mul = M[k][i];
            for (n = i; n < N + 1; ++n){
                M[k][n] = M[k][n] -  mul * M[i][n];
            }
        }
    }
 
    // ???????????????????????£????????°?????£??\???????????¬??????????§£?????¢?????????(????????£??\)
    // ????????¨??????????????????????????§?????¬??????????§£???????????????
    for (i = N - 1; i > 0; --i){
        for (k = i - 1; k >= 0; --k){
            mul = M[k][i];
            for (n = i; n < N + 1; ++n){    
                M[k][n] = M[k][n] - mul * M[i][n];
            }
        }
    }
    cout << fixed << setprecision(3) << M[0][2] << " " << M[1][2] << endl; 
}