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>

double Cut(double figure,int keta)
{
	for(int i=0; i<keta+1; ++i)
	{
		figure *= 10.0;
	}

	int figureI = figure;

	figureI = figureI-figureI%10+(figureI%10>=5 ? 10 : 0);//四捨五入　一回1の桁を0として、1の位が5以上なら〜と場合分け

	figure = figureI;

	for(int i=0; i<keta+1; ++i)
	{
		figure /= 10.0;
	}

	return figure;
}

int main()
{
	std::cout << std::setprecision(3);//小数点以下の”表示”桁数
	
	std::cout << std::setiosflags(std::ios::fixed);
	
	double a,b,c,d,e,f;

	while(std::cin >> a >> b >> c >> d >> e >> f)
	{
		double x = (c*e-b*f)/(a*e-b*d);

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

		std::cout << Cut(x,3) << ' ' << Cut(y,3) << '\n';
	}
	
}

C++: #include <stdio.h>

int main(void)
{
	int ren[3];
	int ren2[3];
	float x;
	float y;
	float z;
	
	while (scanf("%d %d %d %d %d %d",&ren[0],&ren[1],&ren[2],&ren2[0],&ren2[1],&ren2[2]) != EOF){
		x = (double)(ren[2]*ren2[1] - ren2[2]*ren[1]) / (ren[0]*ren2[1] - ren2[0]*ren[1]);
		y = (double)(ren[2]*ren2[0] - ren2[2]*ren[0]) / (ren[1]*ren2[0] - ren2[1]*ren[0]);
		
		printf("%.3f %.3f\n",x,y);
	}
	return(0);
}

C++: #include<stdio.h>
#include<math.h>
int main(void){
    double a,b,c,d,e,f,A,x,y,X,Y,Z;

    while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF){
    A=a;
    a=a*d,b=b*d,c=c*d;
    d=d*A,e=e*A,f=f*A;

    Y=b-e,Z=c-f;
    y=Z/Y;
    x=(c-y*b)/a;
    /*x=x+0.0005,y=y+0.0005;
    x=x*1000,y=y*1000;
    x=floor(x);
    y=floor(y);
    x=x/1000,y=y/1000;
    if(x==-0)x=0;
    if(y==-0)y=0;*/
   printf("%.3lf %.3lf\n",x,y);
    }
   // printf("\na%lf\nb%lf\nc%lf\nd%lf\ne%lf\nf%lf\n%lf\n%lf",a,b,c,d,e,f,Y,Z);


    }

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

using namespace std;

int main(){
  int 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 = (a*f - c*d)/(a*e - b*d);
    cout <<x<<" "<<y<<endl;
  }
  return 0;
}

C++: #include<stdio.h>
#include<stdlib.h>
#include<iostream>
using namespace std;
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) != EOF){
		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;
		printf("%.3lf %.3lf\n",x,y);
	}
    return 0;
	
}

C++: #include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int a, b, c, d, e, f;
    while (cin >> a >> b >> c >> d >> e >> f) {
        double x = round((e * c - b * f) / (e * a - b * d) * 1000) / 1000;
        double y = round((c - a * x) / b * 1000) / 1000;
        cout << fixed << setprecision(3) << x << " " << y << "\n";
    }
}

C++: #include <cstdio>

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

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

	return 0;
}

C++: #include <cstdio>
#include <queue>
#include <vector>

using namespace std;


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

C++: #include <stdio.h>

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

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

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

C++: #include<stdio.h>
int main(){
	double a,b,c,d,e,f;
	double A,B,C,D,E,F;
	double x,y;
	
	while(scanf("%lf%lf%lf%lf%lf%lf",&a ,&b ,&c ,&d ,&e ,&f )!=EOF){
		A=a*d;
		B=b*d;
		C=c*d;
		D=a*d;
		E=a*e;
		F=a*f;
//		printf(" %lfx + %lfy = %lf\n",A,B,C);
//		printf(" %lfx + %lfy = %lf\n",D,E,F);
		if(B==E){y=0;}
		else{y=(C-F)/(B-E);}
		x=(c-b*y)/a;
		printf("%1.3lf %1.3lf",x,y);
	}
	return 0;
}

C++: #include<cstdio>

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)!=EOF){
    x=(c*e-b*f)/(a*e-b*d);
    y=(a*f-d*c)/(a*e-b*d);
    if(x==0)x=0;
    if(y==0)y=0;
    printf("%.3f %.3f\n",x,y);
  }
  return 0;
}

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

int main() {
	std::cout << std::setprecision(3);
	std::cout.setf(std::ios::fixed, std::ios::floatfield);
	double a, b, c, d, e, f;
	while( std::cin >> a >> b >> c >> d >> e >> f ) {
		const double x = (b*f-c*e) / (b*d-a*e);
		const double y = (c-a*x) / b;
		std::cout << ((-0.0005<=x && x<0.0005)?0.0:x) << " " << ((-0.0005<=y && y<0.0005)?0.0:y) << std::endl; 
	}
}

C++: #include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <iomanip>
#include <cassert>
using namespace std;

#define GET_ARG(a,b,c,F,...) F
#define REP3(i,s,e) for (i = s; i <= e; i++)
#define REP2(i,n) REP3 (i,0,(int)(n)-1)
#define REP(...) GET_ARG (__VA_ARGS__,REP3,REP2) (__VA_ARGS__)
#define RREP3(i,s,e) for (i = s; i >= e; i--)
#define RREP2(i,n) RREP3 (i,(int)(n)-1,0)
#define RREP(...) GET_ARG (__VA_ARGS__,RREP3,RREP2) (__VA_ARGS__)
#define DEBUG(x) cerr << #x ": " << x << endl

int main(void) {
    int a, b, c, d, e, f;
    while (cin >> a >> b >> c >> d >> e >> f) {
        double det = a * e - b * d;
        int x = e * c - b * f;
        int y = a * f - d * c;
        cout << fixed << setprecision(10);
        if (x == 0) cout << 0 << " ";
        else cout << x / det << " ";
        cout << fixed << setprecision(10);
        if (y == 0) cout << 0 << endl;
        else cout << y / det << endl;
    }
    return 0;
}

C++: #include<bits/stdc++.h>
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-f*a)/(b*d-e*a);
	 	x=(c-b*y)/a;
	 	cout << x << endl;
	 	cout << y << endl;
	}
	return 0;
}

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

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

double abs2(const double n){
	if (n < 0) return -(n);
	return n;
}

int main(){
	double a, b, c, d, e, f;
	double x, y;
	double A, B, C;
	const double p = 0.00000001;

	while (cin >> a >> b >> c >> d >> e >> f){
		A = (a*e) - (b*d);
		B = (c*e) - (b*f);
		C = (a*f) - (c*d);

		x = B / A;
		y = C / A;
		
		if (abs2(x) < p) x = 0;
		if (abs2(y) < p) y = 0;

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