Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

var sc = bufio.NewScanner(os.Stdin)

func read() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	sc.Split(bufio.ScanLines)
	for sc.Scan() {
		s := strings.Split(sc.Text(), " ")
		a, _ := strconv.ParseFloat(s[0], 64)
		b, _ := strconv.ParseFloat(s[1], 64)
		c, _ := strconv.ParseFloat(s[2], 64)
		d, _ := strconv.ParseFloat(s[3], 64)
		e, _ := strconv.ParseFloat(s[4], 64)
		f, _ := strconv.ParseFloat(s[5], 64)
		x := ((b * f) - (c * e)) / ((b * d) - (a * e))
		y := ((a * f) - (c * d)) / ((a * e) - (b * d))
		if x == 0 {
			fmt.Printf("0.000 %.3f\n", y)
		} else if y == 0 {
			fmt.Printf("%.3f 0.000\n", x)
		} else {
			fmt.Printf("%.3f %.3f\n", x, y)
		}
	}
}

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

int main(){
  int i = 0;
  while(1){
  i++;
  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("%.3f %.3f\n", x, y);
  
  long line = ftell(stdin);
  if(scanf("%d", &a)==EOF) break;
  else{
    fseek(stdin, line, SEEK_SET);
  }
  }
  
  return 0;
}

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

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

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

C++: #include<iostream>
#include<iomanip>
#include<algorithm>
using namespace std;
  
int main(){
  double 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;
    cout << fixed << setprecision(3) << x << " " << y << endl;
  }
  return 0;
}

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

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

    while (getline(std::cin, str)) {
        std::istringstream str_s(str);

        str_s >> a >> b >> c >> d >> e >> f;

        if (c*e - b*f == 0) 
            x = 0;
        else
            x = (c*e - b*f) / (a*e - b*d);

        if (c*d - a*f == 0)
            y = 0;
        else
            y = (c*d - a*f) / (b*d - a*e);

        x = (double)round(x*1000)/1000;
        y = (double)round(y*1000)/1000;

        std::cout.setf(std::ios::fixed);  
        std::cout.precision(3);

        std::cout << std::showpoint << x << ' ' << y ;
    }

    return 0;
}

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

int main(){
	
	double a, b, c, d, e, f, x=0, y=0; // ???????°???°?????°??? %f
	while(cin >> a >> b >> c >> d >> e >> f){
		x = (double)( (b*f-c*e)/(b*d-a*e) );
		y = (double)( (a*f-c*d)/(a*e-b*d) );
		if(x == 0) x = 0.000;
		if(y == 0) y = 0.000;

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

C++: #include<stdio.h>
#define rep(i,m,n) for(i = m;i < n;i++)
int main(){
	double a[6];
	int i,kcor = 0;
	double kx[1000] = {0},ky[1000] = {0};
	while(scanf("%lf",a)!=-1){
		rep(i,1,6)
			scanf("%lf",a+i);
		double det;
		det = a[0]*a[4]-a[1]*a[3];
		kx[kcor] = (a[4]*a[2]-a[1]*a[5])/det;
		ky[kcor] = (-a[3]*a[2]+a[0]*a[5])/det;
		kcor++;
	}
	rep(i,0,kcor){
		printf("%.3lf %.3lf\n",kx[i],ky[i]);
		//printf("%lf %lf\n",kx[i],ky[i]);
	}
	return 0;
}

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

using namespace std;

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

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define REPR(i,n) for(int i=n; i>-1; --i)
#define ALL(a) (a).begin(),(a).end()
#define FILL(a,x); REP(i,sizeof(a)){ (a)[i]=(x); }
#define CINA(a,n); REP(i,(n)){ cin >> (a)[i]; }
#define FILL2(a,n,m,x); REP(i,(n)){ REP(j,(m)){(a)[i][j]=(x);} }
#define CINA2(a,n,m); REP(i,(n)){ REP(j,(m)){cin >> (a)[i][j];} }
#define Liny "Yes\n"
#define Linn "No\n"
#define LINY "YES\n"
#define LINN "NO\n"

#define umap unordered_map
//cout << setfill('0') << right << setw(4) << 12; // "0012"
int keta(ll x){ if(x<10){return 1;} else{return keta(x/10) + 1;}}
int keta_wa(ll x){ if(x<10){return x;} else{return keta_wa(x/10) + x%10;} }
int ctoi(char c){ return ( (c>='0' && c<='9')? c - '0': 0 );}
ll sum(ll a[],ll N){ return accumulate(a,a+N,0LL);}
ll gcd(ll a,ll b){if(a<b)swap(a,b); return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){if(a<b){swap(a,b);} return a/gcd(a,b)*b;}

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-d*b);
    double y = (c*d-a*f)/(b*d-e*a);
    if(abs(x)<0.0005){ x = abs(x);}
    if(abs(y)<0.0005){ y = abs(y);}
    printf("%.3f %.3f\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){
    cout << fixed << setprecision(3);

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

    cout << x << " " << y << endl;
  }
}

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

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

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

/*
??£???????¨????
	ax + by = c
	dx + ey = f
????§£x, y???????????????????????°??????
*/
int main() {
	double a, b, c, d, e, f;
	int cnt = 0;						//??\??????????????£???????¨????????????°
	std::vector<double> x_vector;		//x????§£???????´?
	std::vector<double> y_vector;		//y????§£???????´?

#if 0
	while (cnt < 2) {
		cin >> a >> b >> c >> d >> e >> f;
#else
	while (cin >> a >> b >> c >> d >> e >> f) {
#endif
		double x = (b * f - c * e) / (b * d - a * e);
		double y = (c * d - a * f) / (b * d - a * e);

		cnt++;
		x_vector.push_back(x);
		y_vector.push_back(y);
	}

	for (unsigned int i = 0; i < cnt; i++) {
		double x_result = round(x_vector[i] * 1000) / 1000;
		double y_result = round(y_vector[i] * 1000) / 1000;

		std::cout << std::fixed;
		std::cout << std::setprecision(3) << x_result << " ";
		std::cout << std::setprecision(3) << y_result << endl;
	}

	//???????????°
	//while (1);

	return 0;
}

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