Go: package main

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

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]
		var mulA, mulD int
		if a < 0 {
			mulA = a * -1
		} else {
			mulA = a
		}
		if d < 0 {
			mulD = d * -1
		} else {
			mulD = d
		}
		a *= mulD
		b *= mulD
		c *= mulD
		d *= mulA
		e *= mulA
		f *= mulA

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

		bE := b - e
		cF := c - f
		if bE == 0 {
			bE = 1
		}
		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()
{
	int a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		double x = (c*e - b*f) / (a*e - b*d);
		double y = (f - d*x) / e;
		printf("%1.3f %1.3f\n", x, y);
	}

	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
    int a,b,c,d,e,f;
    double res1,res2,sum1,sum2;
    //int temp=-0;
    //cout<<temp<<endl;
    while(cin>>a>>b>>c>>d>>e>>f)
    {
        int val1=a*e;
        int val2=d*b;
        int res1=val1-val2;
        //cout<<"res1: "<<res1<<endl;
        int val3=e*c;
        int val4=b*f;
        int res2=val3-val4;
        //cout<<"res2: "<<res2<<endl;
        if(res2==0)
            sum1=0;
        else
            sum1=(double)res2/(double)res1;
        int val5=d*c;
        int val6=a*f;
        int res3=val5-val6;
        //cout<<"res3: "<<res3<<endl;
        if(res3==0)
            sum2=0;
        else
            sum2=(-1)*((double)res3/(double)res1);



        //cout<<"sum1: "<<sum1<<endl;

        //if((int)sum1==-0)
        //printf("%.3lf",(-sum1));
        // else
        printf("%.3lf",sum1);
        //if((int)sum2==-0)
        //printf(" %.3lf",(-sum2));
        //else
        printf(" %.3lf",sum2);
        //cout<<sum1<<" "<<sum2<<endl;
        //printf("%.3lf %.3lf\n",sum1,sum2);
    }
    return 0;
}

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

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

        cout << fixed << setprecision(3) << x << " " << y << "\n";
	}
	
	return 0;
}

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

int main(void){
  double a,b,c,d,e,f;
  double x,y;
  
  scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f);
  
  x=(d*f-b*e)/(a*d-b*c);
  y=(a*f-c*e)/(a*d-b*c);

  if((int)x*10000 % 10<5){
    x=(int)(x*1000);
    x=(double)x / 1000.0;
  }
  else{
    x=(int)(x*1000+1);
    x=(double)x / 1000.0;
  }

  if((int)y*10000 % 10<5){
    y=(int)(y*1000);
    y=(double)y / 1000.0;
  }
  else{
    y=(int)(y*1000+1);
    y=(double)y / 1000.0;
  }
  
  printf("%4lf %4lf\n",x,y);
}

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

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

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

using namespace std;

int main(){
	double a,b,c,d,e,f,x,y;
	while(cin.eof()==false){
//		break;
	a=10000;
	cin >> a >> b >> c >> d >> e >> f;
	if (a==10000){
		break;
	}

	double under = a*e-b*d;
	if(abs((c*e-b*f)/under)<0.0005){
		x=0;
	}
	else{
		x=(c*e-b*f)/under;
	}
	if(abs((a*f-c*d)/under)<0.0005){
		y=0;
	}
	else{
		y=(a*f-c*d)/under;
	}

//	cout << (c*e-b*f)/under << " " << (a*f-c*d)/under << endl;
	printf("%.3f %.3f\n",x,y);
	}
}

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

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

C++: #include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <utility>
using namespace std;
typedef pair<double, double> PDD;
PDD calc(double mat[2][2], double vec[2]){
  double a = mat[0][0], b = mat[0][1], d = mat[1][0], e = mat[1][1];
  double c = vec[0], f = vec[1];
  double det = a * e - d * b;
  return make_pair((e * c - b * f) / det, (-c * d + a * f) / det);
}
int main(){
  double mat[2][2];
  double vec[2];
  while(cin >> mat[0][0] >> mat[0][1] >> vec[0] >> mat[1][0] >> mat[1][1] >> vec[1]){
    PDD res = calc(mat, vec);
    double x = (double)(round(res.first*1000))/1000.0, y = (double)(round(res.second*1000))/1000.0;
    x = (x == -0.0) ? 0.0 : x;
    y = (y == -0.0) ? 0.0 : y;
    printf("%.3f %.3f\n", x, y);
  }
  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(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) != EOF){
    int pa = a,pb = b,pc = c,pd = d,pe = e,pf = f;   
    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;
  }
  if(ansY < 0.0005f){
    ansY = 0.0f;
  }

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

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

using namespace std;

int main(){
	double a,b,c,d,e,f,x,y;
	cin>>a>>b>>c>>d>>e>>f;
	y=(double)(d*c-a*f)/(a*b-a*e);
	x=(double)((e*c-b*f)/(e*a-d*b));
	if(x == 0){x = 0;}
    if(y == 0){y = 0;}
	printf("%.3lf %.3lf\n",x,y);
	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 <iostream>
#include <cstdio>

using namespace std;

/*
aX+bY=c
dX+eY=f
*/

void solve(int a, int b, int c, int d, int e, int f) {
	double x = (f - (double)e*c/b) / (d - (double)e*a/b);
	double y = ((double)c - a*x) / b;
	printf("%4.3f %4.3f\n", x, y);
}

int main() {
	int a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		solve(a,b,c,d,e,f);
	}
	return 0;
}

C++: #include <iostream>
#include <stdio.h>
int main()
{
    double a , b , c , d , e , f ;
    while ( std :: cin >> a >> b >> c >> d >> e >> f )
    {
        printf ("%.3lf %.3lf\n" , ( a*e*c - b*a*f ) / ( a*a*e - a*b*d ) , ( a*f - d*c ) / ( a*e - b*d ) ) ;
        //std :: cout << ( a*e*c - b*a*f ) / ( a*a*e - a*b*d ) << ' ' << ( a*f - d*c ) / ( a*e - b*d ) << std :: endl ;
    }
}

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 = (a*f-c*d)/(a*e-b*d);
    cout << "[1] [2]" << fixed << setprecision(3) << x << y << endl;
  }
}

C++: #include<stdio.h>
int main(void){
        float a,b,c,d,e,f,x,y;
        while(scanf("%f %f %f %f %f %f",&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(x==0){
                        x=x*(-1);
                }
                if(y==0){
                        y=y*(-1);
                }
                printf("%.3f %.3f\n",x,y);
        }
        return 0;
}