Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	var strs []string
	var a, b, c, d, e, f float64
	var x, y float64
	for scanner.Scan() {
		strs = strings.Split(scanner.Text(), " ")
		_a, _ := strconv.Atoi(strs[0])
		_b, _ := strconv.Atoi(strs[1])
		_c, _ := strconv.Atoi(strs[2])
		_d, _ := strconv.Atoi(strs[3])
		_e, _ := strconv.Atoi(strs[4])
		_f, _ := strconv.Atoi(strs[5])
		a = float64(_a)
		b = float64(_b)
		c = float64(_c)
		d = float64(_d)
		e = float64(_e)
		f = float64(_f)
		y = (c*d - f*a) / (d*b - a*e)
		x = (c - b*y) / a

		fmt.Printf("%.3f %.3f\n", x, y)
	}
}

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

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

 	return 0;
}

C++: #include <bits/stdc++.h>
#define EPS 1e-8
using namespace std;
typedef vector <double> vec;
typedef vector <vec> mat;

vec gauss(const mat& A,const vec&b){
  int n=A.size();
  mat B(n,vec(n+1));
  
  for(int i=0;i<n;i++)
    for(int j=0;j<n;j++) B[i][j]=A[i][j];

  for(int i=0;i<n;i++)B[i][n]=b[i];

  for(int i=0;i<n;i++){
    int pivot=i;
    for(int j=i;j<n;j++){
      if(abs(B[j][i])>abs(B[pivot][i]))pivot=j;
    }
    swap(B[i],B[pivot]);
    if(abs(B[i][i])<EPS)return vec();
    
    for(int j=i+1;j<=n;j++) B[i][j]/=B[i][i];
    for(int j=0;j<n;j++){
      if(i!=j){
	for(int k=i+1;k<=n;k++)B[j][k]-=B[j][i]*B[i][k];
      }
    }
  }
    vec x(n);
    for(int i=0;i<n;i++) x[i]=B[i][n];
    return x;
}



int main(){
  while(1){
    mat A(2,vec(2));
    vec b(2);
    if(!(cin>>A[0][0]))break;
    cin>>A[0][1]>>b[0];
    cin>>A[1][0]>>A[1][1]>>b[1];
    vec ans=gauss(A,b);
    printf("%.3f %.3f\n",ans[0],ans[1]);
  }
  return 0;
}

C++: #include<stdio.h>

void printFunc(int a,int b,int c,int d,int e,int f);

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

  scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f);
  printFunc(a,b,c,d,e,f);
  scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f);
  printFunc(a,b,c,d,e,f);

  return 0;
}

void printFunc(int a,int b,int c,int d,int e,int f){
  float ansX,ansY;
  if(b == 0 || e == 0){
    ansY = 0;
  }
  else{
    ansY = (float)(c*d - f*a)/(float)(b*d - e*a);
  }

  if(a == 0 || d == 0){
    ansX = 0;
  }
  else{
    ansX = (float)(c*e - f*b)/(float)(a*e - d*b);
  }

  if(ansX < 0.0005f){
    ansX = 0.0f;
  }
  if(ansY < 0.0005f){
    ansY = 0.0f;
  }

  printf("%.3f %.3f\n",ansX,ansY);
}

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

C++: #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)!=EOF){
        if(a==0||e==0){
            printf("0.000 0.000\n");
            return 0;
        } 
        double x=(c-b*f/e)/(a-b*d/e);
        double y=(f-c*d/a)/(e-b*d/a);
        printf("%.3lf %.3lf\n",x,y);
    }

    return 0;
}

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

int main() {
	double a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		printf("%.3lf %.3lf\n", (double)(c*e - b*f) / (a*e - b*d), (double) (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;
	while(cin>>a>>b>>c>>d>>e>>f){     
 double y = ( a * f - c * d) / ( a * e - b * d);
    double x = ( c - b * y ) / a;
	  cout<<fixed<<setprecision(3)<<x << " " << y << endl;
	}

    return 0;
}

C++: #include <iostream>

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

    while (std::cin >> a >> b >> c >> d >> e >> f) {
        x = (c*e - b*f)/(a*e - b*d);
        y = (c*d - a*f)/(b*d - a*e);
        printf ("%.3f %.3f\n", x, y);
    }

    return 0;
}

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

using namespace std;

int main(void){
	double arr[6];
	vector<double> x,y;

	while (cin >> arr[0] >> arr[1] >> arr[2] >> arr[3] >> arr[4] >> arr[5]){
		double a = arr[0]; double b = arr[1]; double c = arr[2]; double d = arr[3]; double e = arr[4]; double f = arr[5];
		x.push_back((c*e-b*f)/(a*e-b*d));
		y.push_back((c*d-a*f)/(b*d-a*e));
	}
	for (unsigned int i=0; i<x.size(); ++i){
		x[i] = round(x[i] * 1000) / 1000;
		y[i] = round(y[i] * 1000) / 1000;
		printf("%.3lf %.3lf\n", x[i], y[i]);
	}
	return 0;
}

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

int main()
{
	int a, b, c, d, e, f;
	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);
		printf("%.3f %.3f", x, y);
	}
	
	return 0;
}

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

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

C++: #include <iostream>
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 - b * f) / (a * e - b * d);
    y = (a * f - d * c) / (a * e - b * d);
    printf("%.3f %.3f\n", x, y);
  }
  return 0;
}

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

int main()
{
	double a, b, c, d, e, f;
	while( std::cin >> a >> b >> c >> d >> e >> f ){
		double det = b * d - a * e;
		printf( "%.3f %.3f\n", ( b * f - c * e ) / det, ( c * d - a * f ) / det );
	}

 	return 0;
}

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

using namespace std;

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

	while (cin >> a >> b >> c >> d >> e >> f) {
		double x, y;
		x = (f - (e*c / b)) / (d - (a*e / b));
		y = (c - a * x) / b;

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

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

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