Go: package main

import (
        "fmt"
        "bufio"
        "os"
)

func main() {
        var a, b, c, d, e, f float64
        sc := bufio.NewScanner(os.Stdin)
        for sc.Scan() {
                fmt.Sscanf(sc.Text(), "%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)

                det := a*e - b*d
                x := (e*c - b*f) / det
                y := (a*f - c*d) / det
                fmt.Printf("%.3f %.3f\n", x, y)
        }
}

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) {
		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++: #define _USE_MATH_DEFINES
#include <iostream> 
#include <iomanip>
#include <string>
#include <map>
#include <math.h>
#include <vector>
#include <algorithm>
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 - f*b) / (a*e - d*b);
		y = (c*d - f*a) / (b*d - e*a);
		std::cout << std::fixed;
		std::cout << std::setprecision(3) << x << " " << y << endl;
	}
	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){
		cin>>b;
		cin>>c;
		cin>>d;
		cin>>e;
		cin>>f;

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

		if(fabs(x)<1e-3 && fabs(y)<1e-3){
			printf("%.3f %.3f\n",fabs(x),fabs(y));
		}
		else if(fabs(x)<1e-3){
			printf("%.3f %.3f\n",fabs(x),y);
		}
		else if(fabs(y)<1e-3){
			printf("%.3f %.3f\n",x,fabs(y));
		}
		else{
			printf("%.3f %.3f\n",x,y);
		}

	}

	return 0;
}

C++: #include <iostream>
#include <cstring>
#include <cstdio>
using namespace std;
 
int main() {
	int a,b,c,d,e,f,q,s;
	double  x,y;
	while(cin >> a>>b>>c>>d>>e>>f){
		x = (c*e-f*b)/(a*e-d*b);
		y = (a*f-d*c)/(a*e-d*b);
		printf("%.3f %.3f\n",x,y);
	}
}

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

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

  return 0;
}

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 = (double)((c*e - b*f)/(a*e - b*d) * 1000) / 1000.0;
        y = (double)((d*c - a*f)/(b*d - a*e) * 1000) / 1000.0;
        x = (x == -0.0) ? 0.000 : x;
        y = (y == -0.0) ? 0.000 : y;
        cout << fixed << setprecision(3);
        cout << x << " " << y << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
#include <string.h>
#include <algorithm>
#include <cmath>
#include <limits>
#include <sstream>
#include <iomanip>

using namespace std;

int main (void)
{
	int 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;

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

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 <iostream>
#include <cstdio>
using namespace std;

int main() {
	double a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		double ansX = (e*c - b*f) / (a*e - b*d);
		double ansY = (a*f - d*c) / (a*e - b*d);
		if (ansX < 0.0005&&-0.0005 < ansX)ansX = 0;
		if (ansY < 0.0005&&-0.0005 < ansY)ansY = 0;
		printf("%.3f %.3f\n", ansX, ansY);
	}

	return 0;
}

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

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

C++: #include <stdio.h>
#include <math.h>
 
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-d*b);
        y=(a*f-c*d)/(a*e-b*d);
        if(x == 0)x=0;
        if(y == 0)y=0;
        printf("%.3lf %.3lf\n",x,y);
    }
 
    return 0;
}

C++: #include<iostream>
using namespace std;
void sort(int &a, int &b, int &c);

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

		printf("%.3f %.3f", x, y);
	}
}

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

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

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

  
    
    return 0;
    
    }

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

int main(void){
    double a,b,c,d,e,f;
    double ansX,ansY;
    while(std::cin >> a >> b >> c >> d >> e >> f){
        ansX = (c*e - b*f) / (a*e - b*d);
        ansX *= 1000;
        if(ansX > 0) 
            ansX += 0.5;
        else 
            ansX -= 0.5;
        ansX = int(ansX);
        ansX /= 1000;
        
        ansY = (a*f - c*d) / (a*e - b*d);
        ansY *= 1000;
        if(ansY > 0) 
            ansY += 0.5;
        else
            ansY -= 0.5;
        ansY = int(ansY);
        ansY /= 1000;
        
        std::cout <<fixed << setprecision(3) << ansX << " " << fixed << setprecision(3)<<ansY << std::endl;
    }
    
    return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <cstdlib>
#include <cmath>
#include <string>

using namespace std;

vector<double> split(string str)
{
  vector<double> vec;
  string s;

  for(int i = 0; i < str.size(); ++i){
    s = "";
    while(i < str.size() && str[i] != ' ') s += str[i++];
    if(s.size()) vec.push_back(atof(s.c_str()));
  }

  return vec;
}

int main()
{
  string str;
  vector<double> vec;
  double t, r1, r2;

  while(getline(cin, str)){
    vec = split(str);
    t = vec[0]*vec[4]-vec[1]*vec[3];
    r1 = (vec[2]*vec[4]-vec[1]*vec[5])/t;
    r2 = (vec[0]*vec[5]-vec[2]*vec[3])/t;
    if(r1 == -0.0) r1 = 0.0;
    if(r2 == -0.0) r2 = 0.0;
    printf("%.3lf %.3lf\n", r1, r2);
  }

  return 0;
}

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

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <functional>
#include <sstream>
#include <stdio.h>
using namespace std;

// Simultaneous Equation(0004)
int main()
{
	int a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		double x = (e*c - b*f) / static_cast<double>(a*e - b*d);
		double y = (d*c - a*f) / static_cast<double>(b*d - a*e);
		
		if (x >= 0)
			x += 0.0005;
		else
			x -= 0.0005;

		if (y >= 0)
			y += 0.0005;
		else
			y -= 0.0005;

		int xx = x * 1000;
		int yy = y * 1000;

		printf("%.3lf %.3lf\n", xx/1000.0, yy/1000.0);

	}
	return 0;
}