Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func gcd(num1, num2 int) int {
	if num2 == 0 {
		return num1
	}
	num3 := num1 % num2
	return gcd(num2, num3)
}

func lcm(num1, num2 int) int {
	if num1%num2 != 0 {
		num3 := gcd(num1, num2)
		for i := 1; ; i++ {
			check := num3 * i
			if check%num1 == 0 && check%num2 == 0 {
				return check
			}
		}
	} else {
		return num1
	}
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	for scanner.Scan() {
		strNums := strings.Fields(scanner.Text())
		nums := []int{}
		for _, strNum := range strNums {
			num, _ := strconv.Atoi(strNum)
			nums = append(nums, num)
		}
		a := nums[0]
		b := nums[1]
		c := nums[2]
		d := nums[3]
		e := nums[4]
		f := nums[5]
		lcm := lcm(a, d)
		mulA := lcm / a
		mulD := lcm / d
		a *= mulA
		b *= mulA
		c *= mulA
		d *= mulD
		e *= mulD
		f *= mulD

		if d < 0 {
			d *= -1
			e *= -1
			f *= -1
		}

		bE := b - e
		cF := c - f
		y := cF / bE
		x := (c - (y * b)) / a

		fmt.Printf("%d.000 ", x)
		fmt.Printf("%d.000\n", y)
	}
}

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

using namespace std;

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

C++: #include<iostream>
#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 = (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);
 }
}

C++: #include <stdio.h>
#pragma warning(disable : 4996)
long double a, b, c, d, e, f, x, y;
int main() {
    while (~scanf("%Lf%Lf%Lf%Lf%Lf%Lf", &a, &b, &c, &d, &e, &f)) {
        x = (c * e - b * f) / (a * e - b * d);
        y = (a * f - c * d) / (a * e - b * d);
        if (-0.0005 < x && x < 0.0005) x = 0.0;
        if (-0.0005 < y && y < 0.0005) y = 0.0;
        printf("%.3Lf %.3Lf\n", x, y);
    }
    return 0;
}

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

/*
??£???????¨????
	ax + by = c
	dx + ey = f
????§£x, y???????????????????????°??????
*/
int main() {
	double a, b, c, d, e, f;
	int cnt = 0;						//??\??????????????£???????¨????????????°
	std::vector<double> x_vector;		//x????§£???????´?
	std::vector<double> y_vector;		//y????§£???????´?

#if 0
	while (cnt < 1) {
		cin >> a >> b >> c >> d >> e >> f;
#else
	while (cin >> a >> b >> c >> d >> e >> f) {
#endif
		double x = (b * f - c * e) / (b * d - a * e);
		double y = (c * d - a * f) / (b * d - a * e);

		cnt++;
		x_vector.push_back(x);
		y_vector.push_back(y);
	}

	for (unsigned int i = 0; i < cnt; i++) {
		std::cout << std::fixed;
		std::cout << std::setprecision(3) << x_vector[i] << " ";
		std::cout << std::setprecision(3) << y_vector[i] << endl;
	}

	cnt = 0;
	x_vector.clear();
	y_vector.clear();

	//???????????°
	//while (1);

	return 0;
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
int main( void )
{
  int a,b,c,d,e,f;
  double x,y;
  while( 1 ){
    cin >> a >> b >> c >> d >> e >> f;
    if( cin.eof() ) break;
    x = (double)(c*e-b*f) / (a*e-b*d);
    y = (double)(a*f-c*d) / (a*e-b*d);
    if( x <= 0 && -0.0005 < x ) x = 0;
    if( y <= 0 && -0.0005 < y ) y = 0;
    printf( "%.3lf %.3lf\n", x, y );
  }
  return 0;
}

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

using namespace std;

double round_(double x) {
    if(abs((double)x) < 0.001) return 0;
    return x;
}

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

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

int main(){
	int count = 0;
	double x[100],y[100];
	double a, b, c, d, e, f;
	while(cin >> a >> b >> e >> c >> d >> f){
		x[count] = (e*d-b*f)/(a*d-b*c);
		y[count] = (a*f-e*c)/(a*d-b*c);
		if(x[count] == -0){
			x[count] = 0;
		}
		if(y[count] == -0){
			y[count] = 0;
		}
		count++;
	}
	for(int i = 0; i < count; i++){
		cout << x[i] << " " << y[i] << endl;
	}
}

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

int main() {
	// your code goes here

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

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

  double x = (double)((e*c-b*f) / (a*e-b*d));
????double y = (double)((-(d*c)+a*f) / (a*e-b*d));
  if(y == 0){
    y = 0;
  }

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

    printf("%.3lf %3lf\n",x,y);

  }
	return 0;
}

C++: #include<stdio.h>
int main(){
	double a,b,c,d,e,f,x,y,;
	while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)){
		x=((c*e-f*b)/(a*e-d*b));
		y=((c-a*x)/b);
		if(x>0)x+=0.0005;
		else x-=0.0005;
		if(y>0)x+=0.0005;
		else y=-=0.0005;
		printf("%.3ld %.3ld",x,y);
	}
	return 0;
}

C++: #include <iostream>
#include <stdlib.h>
#include <string.h>
#include <sstream>
#include <iostream>
#include <math.h>
#include <iomanip>

using namespace std;

string float_to_string(float f, int digits)
{
  if (f == 0) {
    f = 0;
  }
  ostringstream oss;
  oss << setprecision(digits) << setiosflags(ios::fixed) << f;
  return oss.str();
}

void calc_and_output(int *c)
{
  float x = (float)(c[1]*c[5]-c[2]*c[4])/(c[1]*c[3]-c[0]*c[4]);
  float y = (float)(c[0]*c[5]-c[2]*c[3])/(c[0]*c[4]-c[1]*c[3]);

  cout << float_to_string(x, 3) << " " << float_to_string(y, 3) << endl;
}

int main(int argc, char const* argv[])
{
  int c[6];

  string line;
  while (getline(cin, line)) {
    istringstream iss(line);
    int val;
    int c[6];
    for (int i = 0; i < 6; i++) {
      iss >> val;
      c[i] = val;
    };

    calc_and_output(c);
  }

  return 0;
}

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

using namespace std;
float a,b,c,d,e,f;
float findoutx,findouty;
float x,y,yadd;
float Timers1,Timers2;
int main()
{
    cin >> a >> b >> c >> d >> e >> f;
    Timers1 = a;
    Timers2 = d;
    a=a*Timers2;
    b=b*Timers2;
    c=c*Timers2;
    d=d*Timers1;
    e=e*Timers1;
    f=f*Timers1;

    findouty=b-e;
    yadd = c-f;
    findouty = yadd/findouty;
    b = b*findouty;
    findoutx=(c-b)/a;



    cout<<fixed<<setprecision(3)<<findoutx << " "<<findouty<<endl;
    return 0;

}