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;

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

//大文字を小文字に変換
/*
for(int i=0;i<inp.size();i++)
			if(inp[i]>='A' && inp[i]<='Z')
				inp[i]+='a'-'A';
*/

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

using namespace std;

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

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

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

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

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

int main(void) {
    int a, b, c, d, e, f;
    float x, y;
    float det;
    while(cin >> a >> b >> c >> d >> e >> f) {
        det = a * e - b * d;
        x = (float)(e * c - b * f) / det;
        y = (float)(-d * c + a * f) / det;
        x = roundf(1000 * x) / 1000.0;
        y = roundf(1000 * y) / 1000.0;
        if(x == -0)
            x = 0.0;
        if(y == -0)
            y = 0.0;
        printf("%f %f\n", x, y);
    }
}

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

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

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", 1.0 * (1.0 * b*f - c*e)/(b*d - a*e), 1.0 * (1.0 * a*f - c*d)/(a*e - b*d));
}
return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <cmath>
#define EPS 1e-10
using namespace std;
int main(){
  double a,b,c,d,e,f;

  while(1){
    cin >> a >> b >> c >> d >> e >> f;
    if(cin.eof())break;

    double x = (f*b-c*e)/(b*d-a*e);
    double y = (c - a*x)/b;
    if(abs(x) < EPS)x = 0;
    if(abs(y) < EPS)y = 0;
    printf("%.3f %.3f\n",x,y);
  }
}

C++: #include <stdio.h>

int main (void){
	int a, b, c, d, e, f;
	double ans[2];
	while(scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f)!=EOF){
		ans[0]=(double)(b*f-c*e)/(d*b-a*e);
		ans[1]=(double)(c*d-a*f)/(b*d-a*e);
		printf("%.3lf, %.3lf\n", ans[0], ans[1]);
	}
	return 0;
}

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

double round(double x, int k) {
  double res = x * pow(10, k) + 0.5;
  res = (double)(int)res;
  res = res * pow(0.1, k);
  return res;
}

int main() {
  double a, b, c, d, e, f;
  while (cin >> a >> b >> c >> d >> e >> f) {
    double det = a*e - b*d;
    double x = (e * c - b * f)/det;
    double y = (-1*d * c + a * f)/det;
    cout << fixed << setprecision(3) << round(x, 4) 
	 << " " << round(y, 4) << endl;
  }
}

C++: 
#include<stdio.h>

int main (void){

    int a,b,c,d,e,f;

    double X,Y;

    scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f);

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

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

    printf("%.3lf %.3lf\n",X ,Y);


    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <bitset>
#include <set>
#include <map>
#include <stack>
#include <list>
#include <iomanip>

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,b,n) for(int i=b;i<n;i++)
#define SORT(c) sort((c).begin(),(c).end())
#define DESCSORT(c) sort(c.begin(), c.end(), greater<int>())

const float PI = 3.1415926;
static const int INFTY = (1<<30);

using namespace std;

typedef long long ll;
typedef long double ld;

double a,b,c,d,e,f;

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

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

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

#define EPS 1e-12

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

C++: #include <cmath>
#include <cstdlib>
#include <cstdio>

#include <iostream>
#include <vector>
#include <algorithm>

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

  for(;;) {
    std::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);

    printf("%.03lf %.03lf\n", x, y); 

    if( std::cin.eof() ) {
      break;
    }
  }

  return 0;
}

C++: #include <stdio.h>

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

	for(;scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) == 6;){
		y = (c*d-f*a) / (b*d-e*a);
		x = (f-e*y) / d;
		printf("%.3f %.3f\n",x+0.0,y+0.0);
	}

	return 0;
}

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

using namespace std;

int main(){
	cout << setprecision(3) << setiosflags(ios::fixed);
	while(1){
	double a, b, c, d, e, f;
	cin >> a >> b >> c >> d >> e >> f;

	cout << (c*e-f*b)/(a*e-d*b) << " " << (c*d-f*a)/(b*d-a*e) << '\n';

	}
	return 0;
}

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

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