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.Print(x)
		fmt.Print(".000 ")
		fmt.Print(y)
		fmt.Println(".000")
	}
}

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

int main()
{
	float a,b,c,d,e,f,x,y=0;
	
	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("%.3f %.3f\n",x,y);
	}
	
	return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
	double	x,a,b,c,d,e,f;
	cin >> a >> b >> c >> d >> e >> f;
	//a*x-b*d*x/e =c-b*f/e
	for(x=-1000000;x<1000000;x++)
	{
		if(a*(x/1000)+b*((f-d*(x/1000))/e) == c)
		{
			printf("%0.3lf",x/1000);
			break;
		}
	}
	cout << endl;
	
	printf("%0.3lf",(f-d*x/1000)/e); //yÌoÍ
}

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>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;

int main() {
    int a[3];
    int b[3];
    int y[3];
    int x[3];
    while(true) {
    REP(i,3)
        cin >> a[i];
    REP(i,3)
        cin >> b[i];
    if(!cin)
        return 0;
    REP(i,3) 
        y[i] = b[i]*a[0] - a[i]*b[0];
    REP(i,3)
        x[i] = b[i]*y[1] - y[i]*b[1];
    double o[2];
    o[0] = x[2]/double(x[0]);
    o[1] = y[2]/double(y[1]);
    REP(i,2)
        o[i] = (o[i]==0)?0:o[i];
    cout << fixed << setprecision(3) << o[0] << ' ';
    cout << fixed << setprecision(3) << o[1] << '\n';
    }
}

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

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

C++: #include <cstdio>

int main(){
	int p1[5],p2[5],a[5];
	float h[5];

	while(scanf("%d %d %d %d %d %d",&p1[1],&p1[2],&p1[3],&p2[1],&p2[2],&p2[3])!=EOF){
		p1[2] = p1[2]*p2[1];
		p1[3] = p1[3]*p2[1];

		p2[2] = p2[2]*p1[1];
		p2[3] = p2[3]*p1[1];

		p1[1] = p1[1]*p2[1];

		a[1] = p1[2]-p2[2];
		a[2] = p1[3]-p2[3];

		h[2] = a[2]/a[1];

		if(p1[2]*h[2] <= 0)
		{
			h[1] = (p1[3]+(p1[2]*h[2]))/p1[1];
		}else if(p1[2]*h[2] >= 0)
		{
			h[1] = (p1[3]-(p1[2]*h[2]))/p1[1];
		}

		printf("%.3f %.3f\n", h[1],h[2]);
	}
}

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

using namespace std;

int main() {

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


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

			aa=(c*e-b*f)/(a*e-b*d);
	bb=(a*f-c*d)/(a*e-b*d);

	//cout << fixed << setprecision(3) << ((c*e-b*f)/(a*e-b*d))  << " " << ((a*f-c*d)/(a*e-b*d)) << endl;


		printf("%03d %*s %03d",	aa,1,bb);
	
	}

	return 0;
}

C++: //
//  main.cpp
//  b
//
//  Created by h3037178 on 2017/07/31.
//  Copyright ?? 2017??´ ?????£?????????. All rights reserved.
//

#include <iostream>
#include<algorithm>
#include<math.h>
#include<stdio.h>
using namespace std;
int main(){
    float a,b,c,d,e,f,x,y;
    while(cin>>a>>b>>c>>d>>e>>f){
        x=(c*e-f*b)/(a*e-b*d);
        y=(c*d-f*a)/(b*d-a*e);
        printf("%.3f %.3f\n",x,y);
    }
}

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

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

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

#define N 2

using namespace std;

int main(){
	double a[N][N+1];
	double d;
	int i, j, k;
	bool flag = 1;

	while(cin >> a[0][0] >> a[0][1] >> a[0][2] >> a[1][0] >> a[1][1] >> a[1][2]){
		for(k = 0; k < N - 1; k++){
			for(i = k+1; i < N; i++){
				d = a[i][k] / a[k][k];
				for(j = k + 1; j <= N; j++){
					a[i][j] = a[i][j] - a[k][j] * d;
				}
			}
		}
		for(i = N - 1; i >= 0; i--){
			d = a[i][N];
			for(j = i + 1; j < N; j++){
				d = d - a[i][j] * a[j][N];
			}
			a[i][N] = d / a[i][i];
		}
		printf("%.3lf %.3lf", a[0][N], a[1][N]);
	}
	return 0;
}

C++: #include<stdio.h>

int main(void)
{
	int a,b,c,d,e,f;
	while(scanf("%d%d%d%d%d%d\n",&a,&b,&c,&d,&e,&f) != EOF){
	
	double y = ((c*d-a*f)/(b*d-a*e));
	double x = ((c-b*y)/a);
	
	printf("%0.3f %0.3f\n", (double)x,(double)y);
	}
	return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>




void main(void) {
	printf("a,b,c,d,e,f??????????????????????????§??\?????????????????????\n");
	double a=0, b=0, c=0, d=0, e=0, f=0;
	scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f);
	double x = (f*b - e*c) / (d*b - e*a);
	double y = (f*a - d*c) / (e*a - d*b);
	printf("%f %f\n", x, y);
	return;
}

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

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

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

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

using namespace std;
double sg(double n); 
int main()
{
	int a[1000],b[1000],c[1000],d[1000],e[1000],f[1000];
	float x[1000],y[1000];
	int w_x,w_y;
	int len=0;
	while (cin >> a[len] >> b[len] >> c[len] >> d[len] >> e[len] >> f[len])
		len++;

	for (int i=0; i < len; i++) {
		x[i] =  ((e[i] * c[i] - b[i] * f[i]) / (e[i] * a[i] - b[i] * d[i]));
		y[i] =  ((c[i] * d[i] - f[i] * a[i]) / (b[i] * d[i] - a[i] * e[i]));
	}
	for (int i=0; i < len; i++) {
		printf("%.3lf %.3lf\n",sg(x[i]),sg(y[i]));
	}
	return 0;
}
double sg(double n)
{
	int w;
	n = n * 10000;
	w = (int)n % 10;
	n /= 10000;
	if (w > 4) 
		n += 0.001;
	return n;
}

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 = (e*c-b*f) / (a*e-b*d);
    y = (-(d*c)+a*f) / (a*e-b*d);
  printf("%0.3f %0.3f\n",x,y);
 }
}