Go: package main

import "fmt"

func main() {
	var resultX, resultY [100]float32
	var count int
	for {
		var a, b, c, d, e, f, x, y float32
		fmt.Scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)
		if a == 0 {
			break
		}
		//Simultaneous equation
		y = (((a * f) - (d * c)) / ((a * e) - (b * d)))
		x = ((c - (b * y)) / a)
		resultX[count] = x
		resultY[count] = y
		count++
	}
	for i := 0; i < count; i++ {
		fmt.Printf("%.3f %.3f\n", resultX[i], resultY[i])
	}
}

C++: #include <cstdio>

float a,b,c,d,e,f;
int main (){
  scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f);
  float x,y;
  x=(f*b/e-c)/(d*b/e-a);
  y=(f*a/d-c)/(e*a/d-b);
  x*=1000;
  x+=0.5;
  x=int(x);
  x/=1000;
  
  y*=1000;
  y+=0.5;
  y=int(y);
  y/=1000;
  printf("%f %f",x,y);
}

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

C++: #include<iostream>
#include<iomanip>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<cmath>
#include<queue>
#include<stack>
#include<functional>
#include<string>
#include<cstring>
#include <sstream>
using namespace std;
int main(void){
    double a,b,c,d,e,f,x,y;
    while(cin >> a >> b >> c >> d >> e >> f){
        double ad = a / d;
        d *= ad;
        e *= ad;
        f *= ad;
        d -= a;
        e -= b;
        f -= c;
        y = f/e;
        x = (c - b * y)/a;
        y *= 1000;
        y = round(y);
        y /= 1000;
        x *= 1000;
        x = round(x);
        x /= 1000;
        printf("%.3f %.3f\n",x,y);
    }
    return 0;
}

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);
}