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<cstdio>
int main(){
    float a[6];
    float x,y;
    while(~scanf("%f",&a[0])){
        for(int i=1;i<6;i++){
            scanf("%f",&a[i]);
        }
        y=(a[2]-(a[5]*(a[0]/a[3])))/(a[1]-(a[4]*(a[0]/a[3])));
        x=(a[2]-a[1]*y)/a[0];
        printf("%.3f %.3f\n",x,y);
    }
}

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 = (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<stdio.h>
#include<math.h>

int main(void){
	double x1,y1;
	int a=0,b=0,c=0,d=0,e=0,f=0,x2,y2;
    
    while(scanf("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f) != EOF)
	{
	    x2 = (c * e -b * f) / (a * e - b * d)*1000+0.5;
	    y2 = (a * f -d * c) / (a * e - b * d)*1000+0.5;

		x1 = x2/1000;
		y1 = y2/1000;
		printf("%lf %lf\n",x1,y1);
	}
  return 0;
}

C++: const int tt = 10000;

#include<iostream>
#include<string>
#include<sstream>
using namespace std;

string toStr(int n);
string intToString(int n);

int main() {
  int a, b, c, d, e, f;
  
  while(cin >> a >> b >> c >> d >> e >> f) {
    c = c * tt;
    f = f * tt;

    int det = a * e - b * d;

    int x = ( e * c - b * f) / det;
    int y = (-d * c + a * f) / det;
    cout << toStr(x) << " " << toStr(y) << endl;
  }
}

string toStr(int n) {
  string pm, val;
  
  if (n < 0) {
    pm = "-";
    n = -n;
  } else {
    pm = "";
  }

  int ipart = n / tt;
  int fpart = (n - ipart * tt) + tt + 5;

  val = pm + intToString(ipart) + "." + intToString(fpart).substr(1, 3);
  return val;
}

string intToString(int n) {
  stringstream ss;
  ss << n;
  return ss.str();
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const ll MOD = 1e9 + 7/*998244353*/;
const ll INF = 1LL << 60;
ll mod_pow(ll, ll, ll); ll mod_fact(ll, ll); ll mod_inv(ll, ll); ll gcd(ll, ll); ll lcm(ll, ll);
//
int main(){
    ld a, b, c, d, e, f;
    while(cin >> a >> b >> c >> d >> e >> f){
        ld x, y;
        x = (c * e - b * f) / (a * e - b * d);
        y = (c * d - a * f) / (b * d - a * e);
      	if(abs(x) < 1e-10) x = 0;
        if(abs(y) < 1e-10) y = 0;
        cout << fixed << setprecision(3) << x << " " << y << "\n";
    }
}

C++: #include<iostream>
#include<string>
#include<iomanip>
using namespace std;
int main(){
	double x,y,a,b,c,d,e,f;
	while(cin>>a>>b>>c>>d>>e>>f){
		x=(c-(b*f/e))/(a-(b*d/e));
		y=(c-a*x)/b;
		cout<<fixed<<setprecision(3)<<x<<" ";
		cout<<fixed<<setprecision(3)<<y<<endl;
	}
	return 0;
}

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

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

	cin >> a >> b >> c >> d >> e >> f)

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

	cout << showpoint << setprecision(3);
	cout << setiosflags( ios::fixed );
	cout << ( x == -0.0 ? 0.0 : x ) << " " << ( y == -0.0 ? 0.0 : y ) << endl;
}

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

int main()
{
	int a,b,c,d,e,f;
	double x,y;
	while(cin>>a>>b>>c>>d>>e>>f)
	{
		-1000 <= a, b, c, d, e, f <= 1000;
		x= (c*e-b*f)/(a*e-b*d);
		y= (c*d-a*f)/(b*d-a*e);
		
                round(x);
                round(y);
		cout<<setprecision(3);
                cout << setiosflags(ios::fixed);
		cout<<x<<" "<<y<<endl;
	}
	return 0;
}

C++: #include<stdio.h>

void printFunc(int a,int b,int c,int d,int e,int f);

int main(){
  int a = 0,b = 0,c = 0,d = 0,e = 0,f = 0;

  while(fscanf(stdin,"%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) != EOF){
    printFunc(a,b,c,d,e,f);
  }
  
  return 0;
}

void printFunc(int a,int b,int c,int d,int e,int f){
  float ansX,ansY;
  if(b == 0 || e == 0){
    ansY = 0;
  }
  else{
    ansY = (float)(c*d - f*a)/(float)(b*d - e*a);
  }

  if(a == 0 || d == 0){
    ansX = 0;
  }
  else{
    ansX = (float)(c*e - f*b)/(float)(a*e - d*b);
  }

  if(ansX < 0.0005f && ansX > 0.0f){
    ansX = 0.0f;
  }
  if(ansY < 0.0005f && ansY > 0.0f){
    ansY = 0.0f;
  }

  printf("%.3f %.3f\n",ansX,ansY);
}

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)
{
printf("%.3f %.3f\n", (1.0 * b*f - c*e)/(b*d - a*e), (1.0 * a*f - c*d)/(a*e - b*d));
}
return 0;
}

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