Go: package main

import (
	"fmt"
)

func main() {
	for {
		var a, b, c, d, e, f float64
		i, _ := fmt.Scan(&a, &b, &c, &d, &e, &f)
		if i == 0 {
			break
		}

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

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

C++: #include<iostream>
#include<algorithm>
#include<stdio.h>
using namespace std;
int main(){
	long a,b,c,d,e,f;
	long o,p,q,r,s,t;
	double x,y;
	while(scanf("%ld%ld%ld%ld%ld%ld",&a,&b,&c,&d,&e,&f)!=EOF){
		o=a;p=b;q=c;r=d;s=e;t=f;
		o*=d;p*=d;q*=d;
		r*=a;s*=a;t*=a;
		//printf("%d %d %d %d %d %d \n",o,p,q,r,s,t);
		p-=s;
		q-=t;
		if(q==0){
			y=0.0;
		}
		else{
		y=(float)(q/p);
		}
		int g=(int)(e*y);
		g*=-1;
		if(f+g==0){
			x=0.0;
		}
		else{
			x=(float)((f+g)/d);
		}
		x+=0.0005;
		y+=0.0005;
		printf("%.3lf %.3lf\n",x,y);
	}
	return 0;
}

C++: //#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
//#include <cstdlib>
#include <cmath>
#include <iostream>
#include <algorithm>
//#include <cstring>
#include <vector>
#include <string>
#include <map>
#include <list>
#include <queue>
#include <set>
using namespace std;

int main(void){

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

	return 0;
}

/*
for(i=0;i<N;i++){
	cin >> X[i];
}


for(i=0;i<N;i++){
	for(j=0;j<N;j++){
		cin >> X[i][j];
	}
}
*/

C++: #include<iostream>
#include<cstdio>
#include<cctype>
#include<cstring>
#include<string>
#include<algorithm>
#include<queue>
#include<stack>
#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=0;
	y=0;
	x=double(double(double(c/b)-double(f/e))/double(double(a/b)-double(d/e)));
	y=double(double(double(c/a)-double(f/d))/double(double(b/a)-double(e/d)));
	cout<<fixed<<setprecision(3)<<x<<" "<<y<<endl;
}
return 0;
}

C++: #include<algorithm>
#include<functional>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<string>
#include<sstream>
#include<iostream>
#include<iomanip>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<bitset>

#define all(c) (c).begin(), (c).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb(e) push_back(e)
#define mp(a, b) make_pair(a, b)
#define fr first
#define sc second

typedef unsigned long long ull;
typedef long long ll;

const int INF=100000000;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

using namespace std;

typedef pair<int ,int > P;

int a,b,c,d,e,f;

int main()
{

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

	}
	


	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=(double)((e*c-f*b)/(a*e-b*d));
    y=(double)((-(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 a, b, c, d, e, f;
  double x, y;
  while (cin >> a >> b >> c >> d >> e >> f) {
    x = (b * f - c * e) / (b * d - a * e);
    y = (a * f - c * d) / (a * e - b * d);
    printf("%.3f %.3f\n", round(x * 1000)/1000, round(y*1000)/1000);
  }
  return 0;
}

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

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

int main()
{
    double a,b,c,d,e,f;
    double x,y;
    
    while(cin >> a >> b >> c >> d >> e >> f){
        if(b*d - a*e != 0){
         
         double tmp1 = (c*e - b*f),tmp2 = (a*e - b*d),tmp3 = (c*d - a*f),tmp4=(b*d - a*e);
        tmp1 = tmp1/tmp2;
        tmp2 = tmp3/tmp4;
        x = tmp1;
        y = tmp2;
	if(x < 0.0001 && x > -0.0001) x = 0;
	if(y < 0.0001 && y > -0.0001) y = 0;
         printf("%.3f %.3f",x,y);
        }
    }
    return 0;
}

C++: #include <iostream>
#include<string>
#include<cmath>
#include<algorithm>
#include<cctype>
#include<queue>
#include<stack>
#include<stdio.h>
#include<vector>
#include<set>
#include<map>
#include<iomanip>
#define rep(i,n) for(int i=0;i<n;i++)
typedef int long long ll;

using namespace std;
int main(){

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

C++: #include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll, ll> P;

#define EACH(i,a) for (auto& i : a)
#define FOR(i,a,b) for (ll i=(a);i<(b);i++)
#define RFOR(i,a,b) for (ll i=(b)-1;i>=(a);i--)
#define REP(i,n) for (ll i=0;i<(n);i++)
#define RREP(i,n) for (ll i=(n)-1;i>=0;i--)
#define debug(x) cout<<#x<<": "<<x<<endl
#define pb push_back
#define ALL(a) (a).begin(),(a).end()

const ll linf = 1e18;
const int inf = 1e9;
const double eps = 1e-12;
const double pi = acos(-1);

template<typename T>
istream& operator>>(istream& is, vector<T>& vec) {
	EACH(x,vec) is >> x;
	return is;
}
template<typename T>
ostream& operator<<(ostream& os, vector<T>& vec) {
	REP(i,vec.size()) {
		if (i) os << " ";
		os << vec[i];
	}
	return os;
}
template<typename T>
ostream& operator<<(ostream& os, vector< vector<T> >& vec) {
	REP(i,vec.size()) {
		if (i) os << endl;
		os << vec[i];
	}
	return os;
}

int main() {
	std::ios::sync_with_stdio(false);
	std::cin.tie(0);
	int a, b, c, d, e, f;
	while ( cin >> a >> b >> c >> d >> e >> f ) {
		ll delta = a * e - b * d;
		ll x = c * e - b * f;
		ll y = a * f - c * d;
		cout << fixed << setprecision(3) << (ld)x/delta << " " << (ld)y/delta << endl;
	}
}

C++: #include<iostream>
#include<string>
#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-b*f/e)/(a-b*d/e)+0.0;
		y=(c-a*f/d)/(b-a*e/d)+0.0;
		cout<<fixed<<setprecision(3)<<x<<" ";
		cout<<fixed<<setprecision(3)<<y<<endl;
	}
	return 0;
}

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

C++: #include<stdio.h>
int main(void){
	int a,b,c,d,e,f;
	while(scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f)){
	
	double y=(c*d-a*f)/(b*d-a*e);
	double x=(a*e-b*d)/(c*e-b*f);
	printf("%.3f %.3f\n",((int) x*10000%10<5)?x:x+0.001,((int)y*10000%10<5)?y:y+0.001);
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main()
{
	int 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;
}