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 <cstdio>
using namespace std;
int main()
{
  double a,b,c,d,e,f,x,y;
  while(cin >> a){
    cin >> b >> c >> d >> e >> f;
    if(b == 0){
      x = c / a;
    }else if(e == 0){
      x = f / d;
    }else if(b != 0 && e != 0){
      double g = a / b;
      double h = d / e;
      double i = c / b;
      double j = f / e;
      x = (i - j) / (g - h);
    }else{
      return -1;
    }
    if(b != 0){
      y = (c - a * x) / b;
    }else{
      y = (f - d * x) / e;
    }
    x = (int)(x * 1000) / (double)(1000);
    y = (int)(y * 1000) / (double)(1000);
    printf("%.3f %.3f\n", x, y);
  }
  return 0;
}

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

int main(int argc, char** argv) {
	const double EPS = 1.0e-10;
	double a, b, c, d, e, f; // -1000 <= a, b, c, d, e, f <= 1000
	while (cin >> a >> b >> c >> d >> e >> f) {
		double x = (c*e - b*f) / (a*e - b*d);
		double y = (a*f - c*d) / (a*e - b*d);
		if (-0.0005 < x && x < 0.0 + EPS) x = 0.0;
		if (-0.0005 < y && y < 0.0 + EPS) y = 0.0;
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}

C++: #include <iostream>
#include <cmath>
#include <algorithm>
#include <string>
#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=(c*e-b*f)/(a*e-b*d);
       
        y=(c-b*y)/a;
        printf("%.3f %.3f\n",x,y);
    }
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
using namespace std; 
int main()
{
double a,b,c,d,e,f;
while(cin>>a>>b>>c>>d>>e>>f)
{
printf("%.3f %.3f\n", round((1.0 * b*f - c*e)/(b*d - a*e) * 1000.0) / 1000.0, round((1.0 * a*f - c*d)/(a*e - b*d) * 1000.0) / 1000.0);
}
return 0;
}

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

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

C++: // 2011/05/30 Tazoe

#include <iostream>
using namespace std;

int main()
{
	while(true){
		double a, b, c, d, e, f;
		cin >> a;
		if(cin.eof())
			break;
		cin >> b >> c >> d >> e >> f;

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

		cout.precision(3);
		cout << fixed << x;
		cout << ' ';
		cout.precision(3);
		cout << fixed << y;
		cout << endl;
	}

	return 0;
}

C++: #include <stdio.h>
#include <math.h>
int main(){
 double a,b,c,d,e,f,y,x;
while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f) != EOF){
  y=((c*d)-(a*f))/((b*d)-(a*e));
 x=((c*e)-(b*f))/((a*e)-(b*d));
printf("%.3lf %.3lf\n", x,y);
}
return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<sstream>
#include<iomanip>
#include<cstdlib>
using namespace std;

int main()
{
	double a, b, c, d, e, f;
	while (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);
		if (x == 0)x = fabs(x);
		if (y == 0)y = fabs(y);
		cout << fixed << setprecision(3) << x << " ";
		cout << fixed << setprecision(3) << y << endl;
	}
	return 0;
}

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

int main(int argc, const char * argv[])
{
    double a, b, c, d, e, f, x, y;
    //cin >> a >> b >> c >> d >> e >> f
//    while (scanf("%lf %lf %lf %lf %lf %lf ", &a, &b, &c, &d, &e, &f) != EOF) {
    
    while (std::cin >> a >> b >> c >> d >> e >> f) {
        x = y = 0;
        x = (b*f - c*e) / (b*d - a*e);
        if (b*f == c*e) {
            x = 0;
        }
        y = ((a*b*f - a*c*e) / (a*b*e- b*b*d) + c / b);
        printf("%.3f %.3f\n", x, y);
    }
    
    return 0;
}

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

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

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

C++: #include <bits/stdc++.h>
#include <iostream>
#include <cstdio>
#include <math.h>
#include<algorithm>
#include <utility>
using namespace std;
int main() {
	double a, b, c, d, e, f, x, y;
	while (cin >> a >> b >> c >> d >> e >> f) {
		x = (e*c - b*f) / (a*e - b*d);
		y = (c*d - a*f) / (-a*e + b*d);
		if (x == -0.000) {
			x = abs(x);
		}
		if (y == -0.000) {
			y = abs(y);
		}
		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.eof()) {
		cin >> a >> b >> c >> d >> e >> f;
		double bd = b*d;
		double ea = e*a;
		double cd = c*d;
		double fa = f*a;
		y = (cd - fa) / (bd - ea);
		x = (c - b*y) / a;
		printf("%.3f %.3f\n", x, y);
	}
}

C++: #include <stdio.h>
#include <stdlib.h>
#include <string.h>


void main(void) {
	char string[99];
	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 <cstdio>
#include <algorithm>
#include <iostream>
using namespace std;

// ax + by = c  ->  adx = cd - dby
// dx + ey = f  ->  adx = fa - aey

// (db - ae)y = cd - fa
// y = (cd - fa) / (db - ae)
// x = (c - by) / a

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

C++: #include <conio.h>
#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)
	{
		-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);
		if(x == -0.00){x=0.00;}
		if(y == -0.00){y=0.00;}
		cout<<setprecision(3)<<fixed;
		cout<<x<<" "<<y<<endl;
	}
        cin.get();
        getch();
	return 0;
}

C++: #include <stdio.h>

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=(c*e-b*f)/(a*e-b*d)+0.0005;
		y=(c*d-a*f)/(b*d-a*e)+0.0005;

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

C++: #include <iostream>
#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=(f-c*e/b)/(d-a*e/b);
		y=(f-c*d/a)/(e-b*d/a);

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

	return 0;
}

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

using namespace std;

int main(){
	int a, b, c, d, e, f;
	float 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);

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