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++: #include<iostream>
#include<stdio.h>

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

  while(std::cin >>a>>b>>c>>d>>e>>f){

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

  }
}

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

using namespace std;

int w[2][2];
int w0[2];

void solve(){
    float a0 = w[0][0] * w[1][1] - w[0][1] * w[1][0];
    int a1 = w0[0] * w[1][1] - w[0][1] * w0[1];
    int a2 = w[0][0] * w0[1] - w0[0] *w[1][0];
    float x = a1 / a0, y = a2 / a0;
    if(abs(x) <= 0.0005){
        x = 0;
    }
    if(abs(y) <= 0.0005){
        y = 0;
    }
    printf("%.3f %.3f", x, y);
}

int main(){
    while(cin >> w[0][0] >> w[0][1] >> w0[0] >> w[1][0] >> w[1][1] >> w0[1]){
        solve();
    }
    return 0;
}

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


int main(){

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

        cout << setiosflags(ios::fixed) << setprecision(3);
        cout << x << ' ' << y  << endl;
     }
         
	return 0;
}

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

using namespace std;

int main(){
	
	float a, b, c, d, e, f;
	float x, y;
	
	cin >> a >> b >> c >> d >> e >> f;
	
	if ((a != 0) && (b != 0) && (c != 0) && (d != 0) && (e != 0) && (f != 0)){
		x = ((c * e) - (b * f)) / ((a * e) - (b * d));
		y = ((c * d) - (a * f)) / ((b * d) - (a * e));
	}else {
		x = 0;
		y = 0;
	}
	
	
	if (x == 0){
		x = 0;
	}else if (y == 0){
		y = 0;
	}
	
	cout << fixed << setprecision(3) << x << "," << y << endl;
	
	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;
        int  h=a*e-b*d;
        int xx=(c*e-f*b);
        int yy=(a*f-c*d);
        
        int x=xx/h;
        int y=yy/h;
        printf("%.3f %.3f \n",(double)x,(double)y);
        
    }
return 0;
}

C++: #include<iostream>

using namespace std;
   
void Simultaneous()
{
    double a, b, c, d, e, f;
    double x, y;
      
    while(cin>>a>>b>>c>>d>>e>>f)  
    {
        x = ( c * e - b * f ) / ( a * e - b * d );
        y = ( a * f - c * d ) / ( a * e - b * d );
        
        cout.setf(ios::fixed); //"setf" is used for “half-adjusting”
        cout.precision(3); //precision is used for rould off three places of decimals
        cout<<x<<" "<<y<<endl;
    }
            
    return;
}
     
int main()
{     
    Simultaneous();
    return 0;
}

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

char str[20];
int i,len;
int main(){
	gets(str);
	len = strlen(str);
	for(i=len-1;i>=0;i--){
		printf("%c",str[i]);
	}
}

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

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;
	  
}