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<iostream>
#include<iomanip>

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

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

int main()
{
  double a[10],b[10];
  for(int i=0;i<6;i++)
  {

	  cin>>a[i];
	  if((a[i]>1000)||(a[i]<-1000)){
	    cout << "nomber error" <<endl;
	    return 0;
     }
  }
  for(int i=0;i<6;i++)
  {

	  cin>>b[i];
	  if((b[i]>1000)||(b[i]<-1000)){
	    cout << "nomber error" <<endl;
	    return 0;
     }
  }
  cout<<setprecision(4)<<(a[2]*a[4]-a[1]*a[5])/(a[0]*a[4]-a[1]*a[3])<<" ";
  cout<<setprecision(4)<<(a[2]*a[3]-a[0]*a[5])/(a[1]*a[3]-a[0]*a[4])<<" ";
  cout<<setprecision(4)<<(b[2]*b[4]-b[1]*b[5])/(b[0]*b[4]-b[1]*b[3])<<" ";
  cout<<setprecision(4)<<(b[2]*b[3]-b[0]*b[5])/(b[1]*b[3]-b[0]*b[4])<<" ";
  return 0;
}

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

using namespace std;

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

	vector<string> v;
	while (cin >> a >> b >> c >> d >> e >> f) {
		double x, y;

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

		if (x == 0) {
			x = 0;
		}
		else if (y == 0) {
			y = 0;
		}

		x = x * 1000;
		x = round(x);
		x = x / 1000;

		y = y * 1000;
		y = round(y);
		y = y / 1000;

		stringstream ss;
		ss << fixed << setprecision(3) << x << " " << y;
		v.push_back(ss.str());
	}
	
	for (int i = 0; i < v.size(); i++) {
		cout << v[i] << endl;
	}

	return 0;
}

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



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

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

struct vector2{
	float x, y;
	vector2() : x(0), y(0){}
	vector2(float x, float y) : x(x), y(y){}
};

struct sim_elem{
	float a, b, c, d, e, f;
	sim_elem() :a(0), b(0), c(0), d(0), e(0), f(0){}
	sim_elem(float a, float b, float c, float d, float e, float f) :a(0), b(0), c(0), d(0), e(0), f(0){}
};

//	a / d * d
//	ey - by = f - c
//	y / y = (f - c) / y

// ax = -by + c
// ax / a = -(by + c) / a

vector2 sim_equ(sim_elem elem){

	float dx = elem.a / elem.d * elem.d;
	float ey = elem.a / elem.d * elem.e;
	float f = elem.a / elem.d * elem.f;

	float y = ey - elem.b;
	float yr = f - elem.c;
	y = yr / y;

	float ax = -elem.b * y + elem.c;
	float x = ax / elem.a;

	return vector2(x, y);
}

//	sprintf
float placement4(float val){
	char ret[128];
	sprintf_s(ret, "%.3f", val);
	return (float)atof(ret);
}

int main(){

	sim_elem elem;
	while (cin >> elem.a >> elem.b >> elem.c >> elem.d >> elem.e >> elem.f){

		vector2 ret;
		ret = sim_equ(elem);
		printf("%.3f %.3f\n", placement4(ret.x) ,placement4(ret.y) );
	}

	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
	float a,b,c,d,e,f,g,x,y,ans;
	float B,C,E,F,j,k,l;
	while(cin>>a>>b>>c>>d>>e>>f){
		B=b*d;
		C=c*d;
		E=a*e;
		F=a*f;
		j=B-E;
		k=C-F;
		y=k/j;
		x=(c-b*y)/a;
		printf("%.3lf %.3lf\n",x,y);
	}
	return 0;
}

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

int main(){
  double a,b,c,d,e,f;
  while(cin>>a>>b>>c>>d>>e>>f){
    double matrix = 1/(a*e-b*d);
    double x = matrix*(e*c-b*f);
    double y = matrix*(a*f-d*c);
    if(x==-0.0) x=0.0;
    if(y==-0.0) y=0.0;
    printf("%4.3f %4.3f\n",x,y);
  }
}

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

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

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

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

int main()
{
	while (1==1)
	{
		double a,b,c,d,e,f;
		cin>>a>>b>>c>>d>>e>>f;
		double y=(c-((a/d)*f))/(b-((a/d)*e));
		double x=((c)-(b*y))/(a);
		cout<<setprecision(3) << fixed<<x<<" "<<setprecision(3) << fixed<<y<<endl;
	}
}

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

using namespace std;

int main(){
    int a, b, c, d, e, f;
    /***
    |a, b| |x| - |c|
    |d, e| |y| - |f|
     ***/
    while (cin >> a >> b >> c >> d >> e >> f) {
	int p, q, r, s;
	double det = (a*e - b*d);
	p = e;
	q = -b;
	r = -d;
	s = a;

	double x, y;
	x = (p*c + q*f) / det;
	y = (r*c + s*f) / det;
	if (x == 0) {x = 0;}
	if (y == 0) {y = 0;}
	
	printf("%.3lf %.3lf\n", x, y);
    }

    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int a, b, c, d, e, f;
int main() {
	while(cin >> a >> b >> e >> c >> d >> f) {
		double p = d * e - b * f; p /= a * d - b * c; if(-1e-10 < p && p < 1e-10) p = 0.0;
		double q = a * f - c * e; q /= a * d - b * c; if(-1e-10 < q && q < 1e-10) q = 0.0;
		printf("%.3lf %.3lf\n", p, q);
	}
	return 0;
}

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

int main(){
	float a,b,c,d,e,f,x,y;
	while(scanf("%f",&a)){
	scanf("%f%f%f%f%f",&b,&c,&d,&e,&f);
	x=(c*e-b*f)/(a*e-b*d);
	y=(c*d-a*f)/(b*d-a*e);
	printf("%.3f %.3f",x,y);
	std::cout<<std::endl;
	}
	return 0;
	}

C++: #include <iostream>
#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 = (c*d - a*f) / (b*d - a*e);

	if(x==0)x=0;
	if(y==0)y=0;

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