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++: // ------------------------------------
// Date:2018/ 2/13
// Problem:0004 : SimulataneousEquation 4.cpp
//
// ------------------------------------
 
#include <bits/stdc++.h>
 
using namespace std;
 
#define FOR(i,a,b) for(int i=(int)a;i<(int)b;++i)
#define REP(i,n) FOR(i,0,n)
 
int main()
{
  double a,b,c,d,e,f;
  while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) != EOF) {
    printf("%.3lf %.3lf\n",((c*e-b*f)/(a*e-b*d))==0?0.000:(c*e-b*f)/(a*e-b*d), ((c*d-a*f)/(b*d-a*e))==0?0.000:(c*d-a*f)/(b*d-a*e));
  }
  return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <cmath>

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

    while (!cin.eof()){
        cin>>a>>b>>c>>d>>e>>f;
        double D=a*e-b*d;
        double X=(c*e-f*b)/D,Y=(a*f-d*c)/D;
        if (abs(X)<0.0005) X=0;
        if (abs(Y)<0.0005) Y=0;
        cout << setprecision(3)<<fixed;
        cout<<setprecision(3)<<X<<" "<<Y<<endl;

    }
    return 0;
}

C++: #include<iostream>

using namespace std;

int main()
{
	int a[6];
	double detA;
	double ansx, ansy;
	
	for(int i = 0; i < 6; i++){
		cin >> a[i];
	}
	
	detA = ((a[0]*a[4])-(a[1]*a[3]));
	
	ansx = ((a[2]*a[4])-(a[1]*a[5]))/detA;
	ansy = ((a[0]*a[5])-(a[2]*a[3]))/detA;
	
	if(ansx == 0){
		ansx = 0;
	}
	if(ansy == 0){
		ansy = 0;
	}
	
	printf("%.4lf %.4lf",ansx,ansy);
}

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

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

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

void solve_SE(double* x, double a, double b, double c, double d, double e, double f)
{
    x[0] = (c * e - f * b) / (a * e - d * b);
    x[1] = (c * d - f * a) / (b * d - e * a);
}

int main()
{
    double a, b, c, d, e, f;
    double x[2];
    while (cin >> a >> b >> c >> d >> e >> f) {
        solve_SE(&x[0], a, b, c, d, e, f);
        cout << fixed << setprecision(3) << x[0] << ' ' << x[1] << endl;
    }
}

C++: #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<ctime>
#include<cctype>
#include<climits>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<memory>
#include<functional>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;

typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<double> vd;
typedef pair<int, int> pii;
typedef pair<long, long> pll;
typedef long long ll;

int dy[] = { 0, 0, 1, -1, 0 };
int dx[] = { 1, -1, 0, 0, 0 };

double Round(double x){
	x *= 1000;

	if (x > 0.0) {
		x = floor(x + 0.5);
	}
	else {
		x = -1.0 * floor(fabs(x) + 0.5);
	}

	x /= 1000;

	if (-0.0005 < x && x < 0.0005)
		x = 0.0000;

	return x;
}

int main(){
	ios::sync_with_stdio(false);

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

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

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


int main(){
	cout<< setprecision(3) <<setiosflags(ios::fixed);

	
	double a,b,c,d,e,f;
	while(cin >> a,cin>>b,cin>>c,cin>>d,cin>>e,cin>>f){
	
	  cout<<(c*e-f*b)/(a*e-d*b)+0.0000001<<" "<< (c*d-f*a)/(b*d-a*e)+0.00000001<<'\n';
	}
	return 0;
	  
}

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

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

using namespace std;

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

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

		cout << fixed << setprecision(3) << x << " " << y << endl;
	}


	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <set>
#include <vector>
#include <sstream>
#include <typeinfo>

using namespace std;

int main() {
	double a, b, c, d, e, f;
	while (cin) {
		cin >> a >> b >> c >> d >> e >> f;
		auto x = (e*c - b*f) / (a*e - b*d);
		auto y = (a*f - c*d) / (a*e - b*d);
		cout << x << ' ' << y << endl;
	}
	cout << c << endl;
	return 0;
}

C++: #include <iostream>
#include <stack>
#include <map>
#include <algorithm>
#include <sstream>
#include <queue>
#include <string>
#include <iomanip>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <cmath>
using namespace std;
#define F first
#define S second
const int INF=100000000;


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

		printf("%.3Lf %.3Lf\n",x,y);
		//cout << setprecision(3)  << x << " " << y << endl;
	}
	return 0;
}

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

int main(){
    double a[3],b[3];
    double x=0,y=0;
    while(cin >> a[0] >> a[1] >> a[2] >> b[0] >> b[1] >> b[2]){
        x = (b[1]*a[2] - a[1]*b[2])/(a[0]*b[1] - a[1]*b[0]);
        y = (a[0]*b[2] - a[2]*b[0])/(a[0]*b[1] - a[1]*b[0]);
        x = (x<0.001 && x>-0.001) ? 0.0 : x;
        y = (y<0.001 && y>-0.001) ? 0.0 : y;
        cout << fixed << setprecision(3) <<  x << " " << y << endl;
    }
}