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>
using namespace std;

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

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

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

		x *= 10000;
		x = x + 0.5 - (x < 0);
		x = (int)x;
		x /= 10000;

		y *= 10000;
		y = y + 0.5 - (y < 0);
		y = (int)y;
		y /= 10000;


		cout << setprecision(4) << showpoint << x << " " << y << endl;
	}

	return 0;
}

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

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

double ff(double r){
	r*=pow(10,3);
	r = round(r);
	r*=pow(10,-3);
	return r;
}

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

C++: #include <iostream>
using namespace std;
 
int main(void)
{
    int a, b, c, d, e, f;
    while(cin >> a >> b >> c >> d >> e >> f){
        double y = (double)(f*a-c*d)/(a*e-b*d);
        double x = (double)(c-b*y)/a;
        printf("%.3f %.3f\n", x, y);
    }
    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) && (e != 0) || (b != 0) && (d != 0)){
		x = ((c * e) - (b * f)) / ((a * e) - (b * d));
		y = (c - a * x) / b;
	}else if ((b != 0)){
		x = 0;
		y = c / b;
	}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>
using namespace std;


int main(void) {
    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);
        
        cout << x << ' ' << y << endl;
    }
}

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

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

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


#ifndef DEBUG 
#define fprintf (void)
#endif 

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

	while(scanf("%lf",&a)!=EOF){
		scanf("%lf",&b);
		scanf("%lf",&c);
		scanf("%lf",&d);
		scanf("%lf",&e);
		scanf("%lf",&f);
		
		div=b*d-a*e;
		x=(b*f-c*e)/div;
		y=(c*d-a*f)/div;
		
		x=round(x);
		y=round(y);
		
		if(x==-0){
			fprintf(stdout,"yabaix\n");
			x=fabs(x);
		}
		
		if(y==-0){
			fprintf(stdout,"yabaiy\n");
			y=fabs(y);
		}
		
		printf("%lf %lf\n",x,y);
	}
	
	return 0;
}

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

//ax+by=c
//dx+ey=f

//行列式の算出
double Calc_det(const double& p11, const double& p12, const double& p21, const double& p22) {
	return (p11*p22 - p12*p21);
}
//xの解の算出
double Calc_x(const double& det, const double& q1, const double& p22, const double& p12, const double& q2) {
	return ((q1*p22 - p12*q2) / det);
}
//yの解の算出
double Calc_y(const double& det, const double& q2, const double& p11, const double& q1, const double& p21) {
	return ((q2*p11 - p21*q1) / det);
}
//少数点以下第rank位で四捨五入
double Round(const double& value, const int& rank) {
	int root = pow(10, rank);
	return (std::round(value*root) / root);
}

int main() {
	double	a, b, c, d, e, f;//データセット
	double  det;//行列式
	double	x, y;//解
	std::cin >> a >> b >> c >> d >> e >> f;
	det = Calc_det(a, b, d, e);
	x = Calc_x(det, c, e, b, f);
	y = Calc_y(det, a, f, c, d);
	x = Round(x, 4);
	y = Round(y, 4);
	std::cout << std::fixed;
	std::cout << std::setprecision(3) << x << " ";
	std::cout << std::setprecision(3) << y << std::endl;
}

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



int main()
{
	double a[3], b[3];
	while (cin >> a[0] >> a[1] >> a[2] >> b[0] >> b[1] >> b[2])
	{
		if (a[0] == 0)
		{
			double c = a[2] / a[1];
			double d = (b[2] - b[1] * c) / b[1];
			a[2] = d;
			b[2] = d;
		}
		else
		{
			double c = 1;
			if (b[0] != 0)
			{
				c = a[0] / b[0];
				b[1] = b[1] * c - a[1];
				b[2] = b[2] * c - a[2];
			}
			b[2] /= b[1];
			b[1] = 1;
			a[2] -= b[2] * a[1];
			a[2] /= a[0];
		}
		if (a[2] < 0.0001 && a[2] > -0.0001)
			a[2] = 0.000;
		if (b[2] < 0.0001 && b[2] > -0.0001)
			b[2] = 0.000;

		cout << fixed << setprecision(3) << a[2] << b[2] << endl;
	}

	return 0;
}

C++: #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)
	{
		x= (c*e-b*f)/(a*e-b*d);
		y= (c*d-a*f)/(b*d-a*e);
		if(x == -0.00){x=0.00;}
		if(y == -0.00){y=0.00;}
		cout<<setprecision(3)<<fixed;
		cout<<x<<" "<<y<<endl;
	}
	return 0;
}

C++: #include <stdio.h>

int main()
{
	int a,b,c,d,e,f;
	double def;
	double x,y;
	while(scanf("%d %d %d %d %d %d",&a, &b, &c, &d, &e, &f) != EOF){
		if((a * e - b * d) != 0){
			def = 1 / (double)(a * e - b * d);
		}else{
			printf("NA\n");
			continue;
		}
		x = def * (double)(e * c - b * f);
		y = def * (double)(a * f - d * c);
		printf("%.3lf %.3lf\n",x,y);
	}
	return 0;
}

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



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


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

		 y = (c*d - a*f) / (b*d - a*e);
		 x = (c - b*y) / a;
	
		 printf("%.3lf ", x);
		 printf("%.3lf\n", y);

	
	}


	
	
	return 0;
}