Go: package main

import "fmt"

func main() {

	for {
		var a, b, c, d, e, f float64
		var x, y float64
		i, _ := fmt.Scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)
		if i != 6 {
			return
		}

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

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

C++: #pragma GCC optimize "O3"
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#define whole(f,x,...) ([&](decltype((x)) whole) { return (f)(begin(whole), end(whole), ## __VA_ARGS__); })(x)
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define REP_FROM(i,m,n) for (int i = (m); (i) < int(n); ++(i))
#define REP_REV(i,n) for (int i = (n)-1; (i) >= 0; --(i))
#define REP_FROMREV(i,m,n) for (int i = (n)-1; (i) >= int(m); --(i))
#define CLR(a) memset((a), 0 ,sizeof(a))
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
#ifndef LOCAL
#define cerr if (false) cerr
#endif
using namespace std;
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
template<class T> inline T sqr(T x) {return x*x;}
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

template <class T> inline void setmax(T & a, T const & b) { a = max(a, b); }
template <class T> inline void setmin(T & a, T const & b) { a = min(a, b); }
template <class T> T sq(T x) { return x * x; }
template <class T> T clamp(T a, T l, T r) { return min(max(a, l), r); } // [l, r]
const double EPS = 1e-10;
const double PI  = acos(-1.0);

void solve(int a, int b, int c, int d, int e, int f) {
	double x, y;
	y = (d*c-a*f)/(d*b-a*e+EPS);
	printf("%.3f\n", y);
	x = (c-b*y)/a;
	printf("%.3f\n", x);
	printf("%.3f %.3f\n", x, y);
}

int main(int argc, char *argv[]) {
	// Something to do
	int a, b, c, d, e, f;
	while(cin >> a >> b >> c >> d >> e >> f) {
		solve(a,b,c,d,e,f);
	}
	return 0;
}

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

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

}

C++: #include <iostream>
#include <cstdio>
#define eps 1e-10
using namespace std;


int main(void) {
    double a, b, c, d, e, f;
    
    while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF) {
        double ya = d * c - a * f;
        double yb = b * d - a * e;
        if(yb == 0) yb += eps;
        double y = ((ya) / (yb));
        if(a == 0) a += eps;
        double x = ((c - b * y) / a);
        printf("%.3f %.3f",x, y);
    }
    
    return(0);
}

C++: #include<stdio.h>
#include<math.h>
int main(void){
    double a,b,c,d,e,f,A,x,y,X,Y,Z;
 
    while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF){
 
 
    Y=a*e-b*d,Z=f*a-c*d;
    y=Z/Y;
 
    x=(c-b*y)/a;
 
   printf("%.3lf %.3lf\n",x,y);
    }
 
    return 0;
}

C++: #include <iostream>

using namespace std;

int main(){
	
	double a[6];

	for(int i=0; i<6; i++){
		cin >> a[i];
	}

	double x,y;

	y=(a[2]/a[0]-a[5]/a[3])/(a[1]/a[0]-a[4]/a[3]);

	x = a[2]/a[0] - a[1]/a[0] * y;

	
	double diff = 0.5;

	x<0?(diff=-0.5):(diff=0.5);
	x = (int)(x*1000+diff);
	
	y<0?(diff=-0.5):(diff=0.5); 
	y = (int)(y*1000+diff); 
	

	x /= 1000;y/=1000;
	

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

C++: #include <stdio.h>

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

  while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF) {
    x=(double)(c*e-b*f)/(double)(a*e-b*d);
    y=(double)(a*f-c*d)/(double)(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 <iomanip>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <climits>
#include <cfloat>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <functional>
#include <utility>
#include <numeric>

using namespace std;

typedef unsigned int UI;
typedef long long LL;
typedef unsigned long long ULL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int,int> PII;
typedef istringstream ISS;
typedef ostringstream OSS;

#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i )
#define EACH( v, c ) for ( auto &v : c )

#define ITER( c ) __typeof( (c).begin() )
#define IREP( c, it ) for ( ITER(c) it = c.begin(); it != c.end(); ++it )
#define ALL( c ) (c).begin(), (c).end()

#define PB( n ) push_back( n )
#define MP( a, b ) make_pair( ( a ), ( b ) )
#define EXIST( c, e ) ( (c).find( e ) != (c).end() )

#define fst first
#define snd second

#define DUMP( x ) cerr << #x << " = " << ( x ) << endl
#define DEBUG( x ) cerr << __FILE__ << ":" << __LINE__ << ": " << #x << " = " << ( x ) << endl

typedef vector<double> VD;
typedef vector< VD > VVD;

VD solve( VVD matrix )
{
	REP( i, 0, matrix.size() )
	{
		double a = matrix[i][i];

		REP( j, 0, matrix[i].size() )
		{
			matrix[i][j] /= a;
		}

		REP( j, 0, matrix.size() )
		{
			if ( i == j )
			{
				continue;
			}

			double b = matrix[j][i];

			REP( k, 0, matrix[j].size() )
			{
				matrix[j][k] -= b * matrix[i][k];
			}
		}
	}

	VD res;

	transform( ALL( matrix ), back_inserter( res ), []( VD m ){ return m.back(); } );

	return res;
}

int main()
{
	cin.tie( 0 );
	ios::sync_with_stdio( false );

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

	cout.precision( 3 );
	cout << fixed;

	while ( cin >> a >> b >> c >> d >> e >> f )
	{
		VVD matrix { { a, b, c }, { d, e, f } };

		auto res = solve( matrix );

		cout << res[0] << ' ' << res[1] << endl;
	}

	return 0;
}

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

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

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

int main()
{
	double a,b,c,d,e,f;
	while(true){
		cin >> a;
		if(cin.eof())
			break;
		cin >> b >> c >> d >> e >> f;
		int sum = a;
		a = a*d;
		b = b*d;
		c = c*d;
		d = d*sum;
		e = e*sum;
		f = f*sum;
		double x=0.0,y=0.0;
		y = (c-f)/(b-e);
		if(y==-0.0)
			y=0;
		x = (c-b*y)/a;
		if(x==-0.0)
			x=0;
		cout.precision(3);
		cout << fixed <<x << ' ' ;
		cout.precision(3);
		cout << fixed << y << endl;

	}
	return 0;
}

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