Go: package main

import "fmt"

func main() {
	var Xs, Ys []float32
	Xs = make([]float32, 0)
	Ys = make([]float32, 0)
	var cnt 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
		}
		y = (((a * f) - (d * c)) / ((a * e) - (b * d)))
		x = ((c - (b * y)) / a)
		Xs = append(Xs, x)
		Ys = append(Ys, y)
		cnt++
	}
	for i := 0; i < cnt; i++ {
		fmt.Printf("%.3f %.3f\n", Xs[i], Ys[i])
	}
}

C++: #include <cstdio>

#define MAX(a, b)((a) < (b) ? (b) : (a))
#define MIN(a, b)((a) < (b) ? (a) : (b))

using namespace std;

int LCM(int x, int y)
{
    int bigger = MAX(x, y);
    int smaller = MIN(x, y);
    int i = 2;
    int j = 2;
    
    if ((smaller * i) % bigger == 0) return bigger;
    
    while ((smaller * i) % bigger != 0) {
        if (bigger < (smaller * i)) {
            bigger *= j;
            
            j++;
        }
        
        i++;
    }
    
    return bigger;
}

int main() {
	int a, b, c, d, e, f;
	int _a, _b, _c, _d, _e, _f;
	double x, y;
	int _x, _y, _z;
	int multiTop, multiBottom;
	int common;
	
	while (scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF) {
	    common = LCM(a, d);
	    multiTop = common / a;
	    multiBottom = common / d;
	    
	    _a = common;
	    _b = b * multiTop;
	    _c = c * multiTop;
	    
	    _d = common;
	    _e = e * -multiBottom;
	    _f = f * -multiBottom;
	    
	    _y = _b + _e;
	    _z = _c + _f;
	    
	    y = (double)_z / (double)_y;
	    
	    _c = c - (b * y);
	    
	    x = (double)_c / (double)a;
	    
	    printf("%.3f %.3f\n", x, y);
	}
	
	return 0;
}

C++: //Simulataneous Equation
#include<bits/stdc++.h>
using namespace std;

int main(){
  double a, b, c, d, e, f;
  while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f)!=EOF){
    printf("%.3f %.3f\n", (c*e-b*f)/(a*e-b*d), (c*d-a*f)/(b*d-a*e));
  }
  return 0;
}

C++: #include<iostream>
#include<math.h>
#include<algorithm>
#include<string.h>
using namespace std;
int main(){
    double a,b,c,d,e,f,x,y;
    while(cin>>a>>b>>c>>d>>e>>f){
    x=(e*c-f*b)/(a*e-b*d);
    y=(-(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 <cstdio>
#include <cmath>

using namespace std;

int main (int argc, char const* argv[])
{
    double a,b,c,d,e,f;
    double x,y;
    
    while(cin >> a >> b >> c >> d >> e >> f){
        if(!a && !b && !c && !d && !e && !f){
            x = (c*e - b*f) / (a*e - b*d);
            y = (c - a*x)/b;
        }

        if(!a){
            y = c/b;
            x = !e ? x = f/d : (f - e*y)/d;
        }

        if(!b){
            x = c/a;
            y = !d ? f/e : (f - d*x)/e;
        }

        if(!d){
            y = f/e;
            x = !b ? c/a : (c-e*y)/a;
        }

        if(!e){
            x = f/x;
            y = !a ? c/b : (c-a*x)/b;
        }

        x = round(x * 1000)/1000.0;
        y = round(y * 1000)/1000.0;
        
        printf("%.03lf %.03lf\n",x,y);
    }
    
    return 0;
}

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

using namespace std;

int main(){
	int a,b,c,d,e,f;
	float x , y , delta;

	while(cin >> a >> b >> c >> d >> e >> f){
			delta = (a * e) - (b * d);

			x = ((c * e) - (b * f)) / delta;
			y = ((a * f) - (c * d)) / delta;

			if(x / 10000 >= 5){
				x += 0.001;
			}if(y / 10000 >= 5){
				y += 0.001;
			}

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

C++: #include<iostream>
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<queue>
#include<sstream>
#include<algorithm>
#include<map>
#include<complex>
using namespace std;


#define li			long long int
#define rep(i,to)	for(int i=0;i<((int)(to));i++)
#define repp(i,start,to)	for(int i=(int)(start);i<((int)(to));i++)
#define pb			push_back
#define sz(v)		((li)(v).size())
#define bgn(v)		((v).begin())
#define eend(v)		((v).end())
#define allof(v)	(v).begin(), (v).end()
#define dodp(v,n)		memset(v,(li)n,sizeof(v))
#define bit(n)		(1ll<<(li)(n))
#define mp(a,b)		make_pair(a,b)
#define rin	rep(i,n)
#define EPS 1e-10
#define ETOL 1e-8
#define MOD 1000000007
#define p2(a,b)		cout<<a<<"\t"<<b<<endl
#define p3(a,b,c)		cout<<a<<"\t"<<b<<"\t"<<c<<endl

double a[6];

void solve(){
	printf("%.3f %.3f\n",(a[2]*a[4]-a[1]*a[5])/(a[0]*a[4]-a[1]*a[3]),(a[0]*a[5]-a[2]*a[3])/(a[0]*a[4]-a[1]*a[3]));
}

int main(){
	while(cin>>a[0]){
		rep(i,5)cin>>a[i+1];
		solve();
	}
	
	return 0;
}

C++: #include <stdio.h>

int main() {
	
	double a, b, c, d, e, f;	//scanf
	double x, y;							//ans
	int t, t2;
	
	double n = 0, m = 0, j = 0, h = 0, i = 0;						//temp
	
	while(1){
		
		if (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) == EOF) break;
		
		//printf("%lf %lf %lf\n%lf %lf %lf\n", a, b, c, d, e, f);	//input
		
		n = a / d;                                             //Xツづーツ堕オツつヲツつスツつ「
		j = d * n; h = e * n; i = f * n;
		
		//printf("%lf %lf %lf\n%lf %lf %lf\t\t%lf\n", a, b, c, j, h, i, n);
		
		m = b - h;
		y = c - i;
		//printf("%lf %lf\n", m, y);
		
		if(y != 0) y /= m;
		//printf("%lf\n", y);
		
		i = c - (b * y);
		x = i / a;
		
		//printf("x = %lf, y = %lf\n", x, y);
		
		if (x > 0) { x += 0.0005; } else { x -= 0.0005; }
		if (y > 0) { y += 0.0005; } else { y -= 0.0005; }
		
		
		//printf("x = %lf, y = %lf\n", x, y);
		
		x *= 1000;
		y *= 1000;
		
		t = (int)x;
		t2 = (int)y;
		
		//printf("x = %lf, y = %lf t = %d, t2 = %d\n", x, y, t, t2);
		
		x = t;
		y = t2;
		
		x /= 1000;
		y /= 1000;
		
		//printf("%lf %lf\n", x, y);
		printf("%.3lf %.3lf\n", x, y);
		//2 -1 -3 1 -1 -3
		//2 -1 -3 -9 9 27

	}
	return 0;
}

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

int main(){
    double a[3],b[3];
    double x=0,y=0;
    while(cin >> a[0] >> a[1] >> a[2] >> b[0] >> b[1] >> b[2]){
        x = (b[1]*a[2] - a[1]*b[2])/(a[0]*b[1] - a[1]*b[0]);
        y = (a[0]*b[2] - a[2]*b[0])/(a[0]*b[1] - a[1]*b[0]);
        cout << fixed << setprecision(4) <<  x << " " << y << endl;
    }
}

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

int main(){
  double a,b,c,d,e,f;
  while(cin >> a >> b >> c >> d >> e >> f){
    double x,y;
    if(0 != a * e - d * b){
      x = (e * c - b * f)  / (a * e - b * d);
      y = (a * f - d * c)  / (a * e - b * d);
    }else{
      x = 0;
      y = 0;
    }
    double x_ = round(x * 1000)/1000;
    double y_ = round(y * 1000)/1000;
    if(x_ > -0.001 && x_ < 0.001) { x_ = 0; }
    if(y_ > -0.001 && y_ < 0.001) { y_ = 0; }
    cout << fixed << setprecision(3) << x_ << " ";
    cout << fixed << setprecision(3) << y_ << endl;
  }
  return 0;
}

C++: #include <iostream>
#include <stdlib.h>
#include <string.h>
#include <sstream>
#include <iostream>
#include <math.h>
#include <iomanip>

using namespace std;

string float_to_string(float f, int digits)
{
  ostringstream oss;
  oss << setprecision(digits) << setiosflags(ios::fixed) << f;
  return oss.str();
}

int main(int argc, char const* argv[])
{
  int c[6];
  for (int i = 0; i < 6; i++) {
    c[i] = atoi(argv[i+1]);
  }

  float x = (float)(c[1]*c[5]-c[2]*c[4])/(c[1]*c[3]-c[0]*c[4]);
  float y = (float)(c[0]*c[5]-c[2]*c[3])/(c[0]*c[4]-c[1]*c[3]);

  cout << float_to_string(x, 3) << " " << float_to_string(y, 3) << endl;
  return 0;
}

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

#define EPS 1e-12;

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

  while(scanf("%lf %lf %lf %lf %lf %lf",&a ,&b ,&c ,&d ,&e ,&f) != EOF){

    x=(c*e-b*f)/(a*e-b*d);
    y=(d*c-a*f)/(b*d-a*e);
    if(abs(x) < EPS) x = 0.000;
    if(abs(y) < EPS) y = 0.000;
    printf("%.3lf %.3lf\n",x,y);
  
  }
  
  return 0;
}