Go: package main

import "fmt"

func main() {

	for {
		var a, b, c, d, e, f float64
		var x, y float64
		i, _ := fmt.Scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)
		if i != 6 {
			return
		}

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

		fmt.Printf("%.3f %.3f\n", x, y)
	}
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <string>
#include <set>
#include <queue>
#include <stack>
#include <cmath>
#include <functional>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long > vll;
typedef vector< vi > vvi;
int main() {
	float a,b,c,d,e,f,x,y;
	while(true){
		cin>>a>>b>>c>>d>>e>>f;
		if (cin.eof())break;
		x=c*e-b*f;
		y=a*f-c*d;
		x/=a*e-d*b;
		y/=a*e-d*b;
		printf("%.3f %.3f\n",x,y);
	}
}

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

int det(int a00, int a01, int a10, int a11)
{
	return a00*a11 - a01*a10;
}

int main()
{
	int a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f)
	{
		int t = det(a, b, d, e);
		cout << fixed << setprecision(3) << (double)det(c, b, f, e) / t << ' ' << (double)det(a, c, d, f) / t << endl;
	}
	return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int main(void) {
	char string[54];
	double a, b, c, d, e, f, x, y;
	scanf("%s",string);
	
	a = atof(strtok(string, " "));
	b = atof(strtok(NULL, " "));
	c = atof(strtok(NULL, " "));
	d = atof(strtok(NULL, " "));
	e = atof(strtok(NULL, " "));
	f = atof(strtok(NULL, " "));

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

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

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

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

  while(cin >> a >> b >> c >> d >> e >> f){
  

    y = (c*d - f*a)/(b*d-e*a);
    x = (b*y - c)/a;
    
    
    x*=1000;
    y*=1000;
    
    // x+=0.5;
    //y+=0.5;
    
    x/=1000;
    y/=1000;
    
    //cout << x << y << endl;
    printf("%.3f %.3f\n", x, y);
  }

  return 0;
}

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(5);
        if (x == 0) cout << 0 << " ";
        else cout << x / det << " ";
        cout << fixed << setprecision(5);
        if (y == 0) cout << 0 << endl;
        else cout << y / det << endl;
    }
    return 0;
}

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

using namespace std;

int main() {
#ifdef ISMDEEP_LOCAL
    freopen("../in.txt", "r", stdin);
#endif
    double a, b, c, d, e, f;
    while (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF) {
        double x = (c * e - b * f) / (a * e - b * d);
        double y = (a * f - c * d) / (a * e - b * d);
        if (x == 0) x = 0.00;
        if (y == 0) y = 0.00;
        printf("%.3lf %.3lf\n", x, y);
    }
    return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<math.h>

float s(float a) {
	a *= 1000;
	if (a > 0) {
		a += 0.5;
	}
	else {
		a -= 0.5;
	}
	int b = a;
	a = b;
	a /= 1000;
	return a;
}

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

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

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

using namespace std;

int main() {

	double a, b, c, d, e, f;
	
	while (cin >> a >> b >> c  >> d >> e >> f){

	cout << fixed << setprecision(3) << ((c*e-b*f)/(a*e-b*d))  << " " << ((a*f-c*d)/(a*e-b*d)) << endl;
	
	}

	return 0;

C++: #include <stdio.h>

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

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

using namespace std;

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

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

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

	return 0;
}

C++: #include <stdio.h>

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

C++: #include <bits/stdc++.h>
using namespace std;
int main() {
    double a,b,c,d,e,f;
    while(cin >> a >> b >> c >> d >> e >> f){
        double Xa = c * e - b * f;
        double Xb = a * e - b * d;
        double Ya = c * d - a * f;
        double Yb = b * d - a * e;
        printf("%.3lf %.3lf\n", Xa / Xb + 1e-9, Ya / Yb + 1e-9);

    }
}

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

int main(void)
{
  std::cin.tie(0);
  std::ios::sync_with_stdio(false);

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