Go: package main

import (
  "fmt"
)

func main() {
  var a,b,c,d,e,f float64
  var x,y float64
  for _, err := fmt.Scan(&a, &b, &c, &d, &e, &f); err == nil;
   _, err = fmt.Scan(&a, &b, &c, &d, &e, &f) {
    y = (a*f-c*d)/(a*e-b*d)
    x = (c-b*y)/a
    fmt.Printf("%.3f %.3f\n", x,y)
  }
}

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



#ifndef DEBUG 
#define fprintf (void)
#endif 

int main(void){
	
	double a,b,c,d,e,f;
	double x,y,div;
	int xd[5],yd[5];
	int i;
	double megax,megay;
	int recx,recy;
	

	while(scanf("%lf",&a)!=EOF){
		scanf("%lf",&b);
		scanf("%lf",&c);
		scanf("%lf",&d);
		scanf("%lf",&e);
		scanf("%lf",&f);
		
		div=b*d-a*e;
		x=(b*f-c*e)/div;
		y=(c*d-a*f)/div;
		
		megax=x*10000;
		megay=y*10000;
		
		if(x==-0){
			fprintf(stdout,"yabaix\n");
			x=fabs(x);
		}
		
		if(y==-0){
			fprintf(stdout,"yabaiy\n");
			y=fabs(y);
		}
		
		recx=(int) fabs(megax);
		
		for(i=4;i>0;i--){
		xd[i]=recx%10;
		recx/=10;
		}
		
		xd[0]=recx;
	
		if(xd[4]>=5){
			xd[3]++;
		}
		
		if(xd[3]>=10){
			xd[2]++;
			xd[3]=0;
		}
		
		if(xd[2]>=10){
			xd[1]++;
			xd[2]=0;
		}
		
		if(xd[1]>=10){
			xd[0]++;
			xd[1]=0;
		}
		
		recy=(int) fabs(megay);
		
		for(i=4;i>0;i--){
		yd[i]=recy%10;
		recy/=10;
		}
		
		yd[0]=recy;
	
		if(yd[4]>=5){
			yd[3]++;
		}
		
		if(yd[3]>=10){
			yd[2]++;
			yd[3]=0;
		}
		
		if(xd[2]>=10){
			yd[1]++;
			yd[2]=0;
		}
		
		if(yd[1]>=10){
			yd[0]++;
			yd[1]=0;
		}

		if(x<0){
			xd[0]*=-1;
		}
		
		if(y<0){
			yd[0]*=-1;
		}

		
		printf("%d.%d%d%d %d.%d%d%d\n",xd[0],xd[1],xd[2],xd[3],yd[0],yd[1],yd[2],yd[3]);
	}
	
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <deque>
#include <list>
#include <string>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>

using namespace std;

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

int main() {
	a = -10000;
	cin >> a >> b >> c >> d >> e >> f;

	while (a != -10000) {
		x = (c * e - f * b) / (a * e - d * b);
		y = (c * d - f * a) / (b * d - e * a);

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

		a = -10000;
		cin >> a >> b >> c >> d >> e >> f;
	}

	return 0;
}

/*@@@@@@@@@@@@@@@@@@@@@@@@@*/
/*@                       @*/
/*@ debug output erased ? @*/
/*@                       @*/
/*@@@@@@@@@@@@@@@@@@@@@@@@@*/

C++: #include <iostream>
using namespace std;
int main() {
  int a, b, c, d, e, f;
  while (cin >> a >> b >> c >> d >> e >> f) {
    printf("%.3f %.3f\n",  (1.0 * b * f - c * e) / (b * d - a * e), (1.0 * a * f - c * d) / (a * e - b * d));
  }
  return 0;
}

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){
        x = (double)((c*e - b*f)/(a*e - b*d) * 1000) / 1000.0;
        y = (double)((d*c - a*f)/(b*d - a*e) * 1000) / 1000.0;
        x = (x == -0.0) ? 0.000 : x;
        y = (y == -0.0) ? 0.000 : y;
        cout << fixed << setprecision(3);
        cout << x << " " << y << endl;
    }
    return 0;
}

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

void pri(double a, double b, double c, double d, double e, double f){
	printf("(%4f)x + (%4f)y = (%4f)\n(%4f)x + (%4f)y = (%4f)\n\n", a, b, c, d, e, f);
}

int main(){
	double a, b, c, d, e, f, x, y;
	
	while(cin >>a >>b >>c >>d >>e >>f){
		
		b /= a; c /= a; a /= a;
		
		e -= d * b; f -= d * c;
		
		y = f / e;
		
		x = c - (b * y);
		
		if(x < 0) x = ceil(x * 1000 - 0.5) / 1000;
		else x = floor(x * 1000 + 0.5) / 1000;
		if(y < 0) y = ceil(y * 1000 - 0.5) / 1000;
		else y = floor(y * 1000 + 0.5) / 1000;
		
		printf("%.3f %.3f\n", x, y);
	}
	
	return 0;
}

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

#define REP(i,n) for(int i = 0;i<(int)n;i++)
#define FOR(i,a,b) for(int i = (a);i < (b);i++)
#define RFOR(i,a,b) for(int i = (a);i>(b);i--)

using namespace std;

int main(void){
    
    int i,j=0,k = 0,l=0,m = 0,n= 0;
    double a,b,c,d,e,f;
    double x1,x2;
    
    cin >> a >> b >> c;
    cin >> d >> e >> f;
    
    double gyouretusiki = (a*e - d*b);
    
    x1 = (c/a) - (b/gyouretusiki)*(f -((d*c)/a));
    
    x2 = ((a) /(gyouretusiki))*(f-((d*c)/a));
    
    
    printf("%.3f %.3f\n",x1,x2);
    return 0;
            
                  
                  
    
}

C++: #include <cstdio>
#include <cmath>

double r(double d){
  double a = roundl(d*1000);
  if(a==0) return +0.0;
  return a/1000;
}

int main(){
  double a,b,c,d,e,f;
  while(~scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))
    printf("%.3f %.3f",r((c*e-b*f)/(a*e-b*d)),r((-c*d+a*f)/(a*e-b*d)));
}

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

int get_gcd(int a, int b) {
    if (a % b == 0) return b;
    return get_gcd(b, a % b);
}

int main() {
    int a,b;
    while (cin>>a>>b) {
        if (a < b) {
            int tmp = a;
            a = b;
            b = tmp;
        }

        int gcd = get_gcd(a,b);

        int lcm = (a * b) / gcd;
        cout << gcd << " " << lcm << endl;

    }
    return 0;
}

C++: #include <stdio.h>
#define EPS 1e-10
int main() {
    int a,b,c,d,e,f,x;double q,r;while (scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF) {
        x=-a;a*=d,b*=d,c*=d;d*=x,e*=x,f*=x;q=(f+c)/(b+e+0.0);r=(f-(e*q))/(d+0.0);if (r<EPS && r>-EPS) r=0.0;if (q<EPS && q>-EPS) q=0.0;printf("%.3lf %.3lf\n",r,q);} return 0;}

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

int main(void) {
  string input;
  while (getline(cin, input)) {
    float a, b, c, d, e, f;
    sscanf(input.c_str(), "%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f);
    float x = (c*e-b*f)/(a*e-b*d);
    float y = (c*d-a*f)/(b*d-a*e);
    printf("%.3f %.3f\n", x, y);
  }
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
  double a,b,c,d,e,f,x,y;
  while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) != EOF){
    x = (a*f - c+d)/(a*e - d*b);
    y = (c -b*y)/a;
    if(x == -0)x = 0;
    if(y == -0)y = 0;
    printf("%.3f %.3f",x,y);
  }
}

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

int main() {
	int a, b, c, d, e, f;
	vector<double> x, y;
	while (cin >> a) {
		double tmpY;
		cin >> b >> c >> d >> e >> f;
		if (a*e != b*d) {
			y.push_back((c*d - a*f) / (b*d - a*e));
			tmpY = (c*d - a*f) / (b*d - a*e);
		} else {
			continue;
		}
		if (a != 0) {
			x.push_back((c - b*tmpY) / a);
		} else if (d != 0) {
			x.push_back((f - e*tmpY) / d);
		} else {
			continue;
		}
	}

	for (int i = 0; i < x.size(); i++) {
		cout << fixed << setprecision(3) << x[i] << " " << y[i] << endl;
	}
}

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

int main() {
	double a, b, c, d, e, f, xx, yy;
	while (cin >> a >> b >> c >> d >> e >> f) {
	double x = (c*e - b * f) / (a*e - b * d);
	double y = (c*d - a * f) / (b*d - a * e);
		cout << fixed << 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;
	cout << fixed << setprecision(3);
	while (cin >> a >> b >> c >> d >> e >> f) {
		x = (c * e - b * f) / (a * e - b * d);
		y = (c - a * x) / b;
		cout << x << " " << y << endl;
	}
	return 0;
}

C++: #include <stdio.h>

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

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

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

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)) != -1) {
    double x, y;
    double denom = a * e - b *d;
    double nomer_x = c*e - b*f;
    double nomer_y = -c*d + a*f;
    x = nomer_x / denom;
    y = nomer_y / denom;

    if(x == 0) { x = 0;  }
    if(y == 0) { y = 0;  }

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

  return 0;
}