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 <cstdio>

using namespace std;

double EPS = 1e-9;

int main() {
	double a, b, c, d, e, f;
	
	while (cin >> a >> b >> c >> d >> e >> f) {
		double x, y;
		y = (c - a*f/d)/(b - a*e/d);
		x = (c - b*y)/a;
		printf("%.3lf %.3lf\n", x - EPS, y - EPS);
	}
	
	return 0;
}

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

int main( void )
{
	float a,b,c,d,e,f;
	while( scanf( "%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f ) )
	{
		if( feof( stdin ) ) break;
		float det = 1.0f / ( a*e - b*d );
		float x = det * ( e*c - b*f );
		float y = det * ( -c*d + a*f );
		if( fabs( x ) < 0.001f ) x = 0.0f;
		if( fabs( y ) < 0.001f ) y = 0.0f;
		printf( "%.3f %.3f\n", x, y );
	}
	return 0;
}

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

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 - a*e);

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

	}

	return 0;

}

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

int main()
{
    for (double a, b, c, d, e, f; cin >> a >> b >> c >> d >> e >> f; )
        cout << fixed << setprecision(3)
            << (b*f - c*e)/(b*d - a*e) + 0.0
            << " "
            << (a*f - c*d)/(a*e - b*d) + 0.0 << endl;

    return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <iomanip>
//#include <vector>
//#include <string>
//#include <algorithm>
//#include <functional>

using namespace std;

int main(){

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

	while(cin >> a >> b >> c >> d >> e >> f){
		A = a*e - b*d;
		x = (e*c - b*f) / A;
		y = (a*f - d*c) / A;
		cout << fixed << setprecision(3);
		cout << x <<" "<< y << endl;
		//printf("%.3f %.3f\n", x , y );
	}



	return 0;
}

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

using namespace std;

int main()
{
	int a, b, c, d, e, f, ny, li, ac, dc;
	double x, y;

	while (cin >> a >> b >> c >> d >> e >> f){
		ac = a;
		dc = d;
		a *= dc;
		b *= dc;
		c *= dc;
		d *= ac;
		e *= ac;
		f *= ac; 		
		ny = b - e;
		li = c - f;
		y = li / ny;
		x = (c - b * y) / a;		

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

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

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

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

	return 0;
}

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

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

}

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

void OutputSolution(int a, int b, int c, int d, int e, int f)
{
    double x, y;
	if(b == 0){
		x = c / a;
		y = (f-d*x) / e;
	}else{
		int B = b;
		a *= e;
		b *= e;
		c *= e;
		d *= B;
		e *= B;
		f *= B;
		x = (c-f) / (a-d);
		y = (c-a*x) / b;
	}
	if(x == -0) x == 0;
	cout << fixed << setprecision(3) << x << ' ' << y << endl;
}

int main()
{
	while(true){
		int a, b, c, d, e, f;
		cin >> a >> b >> c >> d >> e >> f;
		if(cin.eof()) break;
		OutputSolution(a, b, c, d, e, f);
	}
	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<complex>
#include<iomanip>
using namespace std;
int main(){
	double a,b,c,d,e,f,x,y;
	int t=80000;
	for(int i=t;i;i--){
		for(int j=i;j;j--){
			if(i+j==2)a=0.0;
		}
	}
	while(cin>>a){cin>>b>>c>>d>>e>>f;
		x=(c*e-b*f)/(a*e-b*d),y=(c*d-a*f)/(b*d-a*e);
		cout<<fixed<<setprecision(3)<<x<<" ";
		cout<<fixed<<setprecision(3)<<y<<endl;
	}
	return 0;
}

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

C++: #include<stdio.h>

int main(void){
  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){
    if(a*e == b*d){
      printf("This equiation has no real number solution");
      break;
    }
    x =(double)(e * c + (-1)*b*f)/(double)(a*e-b*d);
    y = (double)((-1)*d*c + a * f)/(double)(a * e - b* d);
    printf("%f %f\n",x,y);
  }
}

C++: #include<stdio.h>

int main(){
	double a,b,c,d,e,f,x,y;
	int status;
	while(1){
		status=scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f);
		if (status==EOF){
			break;
		}
		x=(f/e-c/b)/(d/e-a/b);
		y=c/b-a*x/b;
		if (x<0.0005 && x>-0.0005){
			x=0;
		}
		if (y<0.0005 && y>-0.0005){
			y=0;
		}
		printf("%.3f %.3f\n",x,y);-
		printf("%f %f\n",x,y);
	}
	
	return 0;
}

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

int main()
{
	std::vector<int> x, y;
	int a, b, c, d, p, q;
	while (scanf_s("%d %d %d %d %d %d", &a, &b, &p, &c, &d, &q) != EOF)
	{
		x.push_back(d*p - b*q / (a*d - b*c));
		y.push_back(p*c - a*q / (b*c - a*d));
	}

	for (int i = 0; i < x.size(); ++i)
		std::cout << x[i] << " " << y[i] << std::endl;
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <string>
#include <set>
#include <queue>
#include <stack>
#include <cmath>
#include <functional>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long > vll;
typedef vector< vi > vvi;
int main() {
	float a,b,c,d,e,f,x,y;
	while(true){
		cin>>a>>b>>c>>d>>e>>f;
		if (cin.eof())break;
		x=c*e-b*f;
		y=a*f-c*d;
		if(x!=0){
		x/=a*e-d*b;
	}
		if(y!=0){
		y/=a*e-d*b;
	}
		printf("%.3f %.3f\n",x,y);
	}
}

C++: #include<iostream>

int main(){
    int a[5],i,j,n;
    
    for(i=0;i<5;i++){
        std::cin>>a[i];
         }
    for(i=0;i<4;i++){
        for(j=i+1;j<5;j++){
            if(a[i]<a[j]){
            n=a[i];
            a[i]=a[j];
            a[j]=n;
            	     }
                 }
            }
            
    for(i=0;i<5;i++){
    std::cout<<a[i]<<" ";
    }
                 
return 0;
}

C++: #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
#define loop(i,x,n) for(int i=(x);i<(n);i++)
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define mp make_pair
#define fir first
#define sec second
#define ub upper_bound
#define lb lower_bound
#define int long long
using namespace std;
const int MOD=1000000007;
const int INF=1000000009;

signed main(){
  double a,b,c,d,e,f;
  while(cin>>a){
    cin>>b>>c>>d>>e>>f;
    double x=(f*b-e*c)/(b*d-e*a);
    double y=(c-a*x)/b;
    if(abs(x)==0)x=0.000;
    if(abs(y)==0)y=0.000;
    printf("%.3f %.3f\n",x,y);
  }
  return 0;
}