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

int main()
{
    int a,b,c,d,e,f;
    double x,y;
    for(int i=0;i<2;i++){
        cin>>a>>b>>c>>d>>e>>f;
        double l,m,n;
        l=a/d;
        m=b-e*l;
        n=c-f*l;
        y=n/m;
        x=(c-b*y)/a;
        printf("%.3f %.3f\n",x,y);
    }
    return 0;
}

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

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

C++: #include <iostream>
#include <cstdio>
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 = (f-d*x)/e;
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}

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

/*
 * Wrong Answer
 * 2015-06-26 02:00
 */

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

	while( std::cin >> a >> b >> c >> d >> e >> f ){
		y = ( a * f - c * d ) / ( a * e - b * d );
		x = ( c - b * (( a * f - c * d ) / ( a * e - b * d ))) / a;
		printf("%.3f %.3f\n", x, y );
	}

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

	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);
        y = (double)(c*d - a*f)/(b*d - a*e);
        cout << setprecision(3) << setiosflags(ios::fixed) << x << ' ' << y << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <cassert>
#include <iomanip>
#include <cmath>

#define EPS (1e-6)

void solveSimultaneousEquation(double a, double b, double c, double d, double e, double f, 
                               std::pair<double, double>* pResult)
{
  assert(b * d - a * e != 0);
  std::pair<double, double>& result = *pResult;

  result.first = (b * f - c * e) / (b * d - a * e);
  result.second = (c * d - a * f) / (b * d - a * e);

  if (fabs(result.first) < EPS) {
    result.first = 0.0;
  }
  if (fabs(result.second) < EPS) {
    result.first = 0.0;
  }
}

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

  while (std::cin >> a >> b >> c >> d >> e >> f) {
    std::pair<double, double> result;
    solveSimultaneousEquation(a, b, c, d, e, f, &result);
    std::cout << std::fixed << std::setprecision(3) << result.first << " " << result.second << std::endl;
  }

  return 0;
}

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

using namespace std;

double solutionY();
double solutionX(double);
double a1,b1,c1,d1,e1,f1;

int main(){
  while(cin){
    cin >> a1 >> b1 >> c1 >> d1 >> e1 >> f1;//入力の最後まで処理って何だよ死ね！！
    double x,y;
    
    y = solutionY();
    x = solutionX(y);
    
    if(cin)cout << fixed << setprecision(3) << x << " " << y << endl ;
  }
  return 0;
}

double solutionY(){
  double b,c,e,f;
  b = b1/a1;
  c = c1/a1;

  e = e1/d1;
  f = f1/d1;
  
  return (c - f)/(b - e);
}

double solutionX(double y){
  double b,c;
  b = b1/a1;
  c = c1/a1;
  
  return (c - b*y);
}

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

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

int main(int, char**)
{
	double a, b, c, d, e, f = 0;
	while (std::cin >> a >> b >> c >> d >> e >> f)
	{
		double y = std::roundl((c * d - a * f) / (b * d - a * e) * 1000.0) / 1000.0;
		double x = std::roundl((c * e - b * f) / (a * e - b * d) * 1000.0) / 1000.0;
		printf("%.3f %.3f\n", x + 0, y + 0);
	}
}

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

double RoundOff(double src, int keta);

int main(void)
{
	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)
	{
		y = (double)((a*f-d*c)/(-1*d*b+a*e));
		x = (double)((c-b*y)/a);
		
		printf("%.3f %.3f\n",RoundOff(x,4),RoundOff(y,4));
	}
	
	return 0;
}

double RoundOff(double src, int keta)
{
	// 10^keta 
	src *= pow(10.0, (double)(keta-1));
	if(src>0){
		// (int)(num+0.5) cast
		src = (int)(src+0.5);
	}
	else{
		// (int)(num-0.5)
		src = (int)(src-0.5);
	}
	// 10^-keta
	src /= pow(10.0, (double)(keta-1));
	
	return src;
}

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

	return 0;
}

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

void main(){
	int a,b,c,d,e,f;
	
	cout<<"ax+by=c"<<endl<<"dx+ef=f"<<endl;
	cout<<"		????§£???x,y??????????????????"<<endl;
	
	cout<<"a b c d e f >>>>";
	cin>>a>>b>>c>>d>>e>>f;
	
	cout<<"x="<<(e*c-b*f)/(a*e-b*d)
		<<"y="<<(-c*d+a*f)/(a*e-b*d)<<endl;
}

C++: #include <conio.h>
#include <iostream>
#include <iomanip>
#include <math.h>
using namespace std;

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

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

using namespace std;

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

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