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

int main(){
    int 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;
        int tmp = x*1000;
        x = tmp / 1000;
        tmp = y* 1000;
        y = tmp / 1000;
        cout<<x<<" "<<y<<endl;
    }
    return 0;
}

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

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

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

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

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

		if(x == 0){
			x = 0;
		}
		if(y == 0){
			y = 0;
		}

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

	return 0;
}

C++: #include <iostream>
using namespace std;
 
int main()
{
    double a, b, c, d, e, f;
 
    while (cin >> a >> b >> c >> d >> e >> f)
    {
        b = b * d / a;
        c = c * d / a;
        a = a * d / a;
 
        d = d - a;           // d = 0
        e = e - b;
        f = f - c;
     
        f = f * b / e;
        e = e * b / e;
 
 
        b = b - e;            // b = 0
        c = c - f;
 
        c = c / a;            // x = c
        a = a / a;
 
        f = f / e;            // y = f
        e = e / e;
 
        cout << fixed << setprecision(3) << c << " " << fixed << setprecision(3) << f << endl;
    }
 
    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 = (b*f - e * c) / (b*d - a * e);

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

       x = int(1000 * x + 2 * (1000 * x - int(1000 * x))) / 1000.0;

       y = int(1000 * y + 2 * (1000 * y - int(1000 * y))) / 1000.0;

       printf("%.3lf %.3lf\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) {
		double mat = a * e - b * d;
		double dx = (c * e - b * f) / mat;
		double dy = (a * f - d * c) / mat;

		if (dx == -0.) dx = 0.;
		if (dy == -0.) dy = 0.;
		printf("%.3f %.3f\n", dx, dy);
	}
	return 0;
}

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

double is(double n)
{
	double mammad=n*1000;
	int mammadd=(int)mammad;
	return (double)mammadd / 1000.00;
}

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

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

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)
{

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

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

C++: #include <stdio.h>

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

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

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

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("%.3f %.3f\n", x, y);
}
}

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

using namespace std;
double round(double value);

int main(){
  double a,b,c,d,e,f;
  vector<double> al,bl,cl,dl,el,fl;
  double x,y,n,m;

  while(cin >> a >> b >> c >> d >> e >> f){
    al.push_back(a);
    bl.push_back(b);
    cl.push_back(c);
    dl.push_back(d);
    el.push_back(e);
    fl.push_back(f);
  }

  for(int i=0; i<al.size(); i++){
    n = bl[i]/el[i];
    m = al[i]/dl[i];
    x = (cl[i]-n*fl[i])/(al[i]-n*dl[i]); 
    y = (cl[i]-m*fl[i])/(bl[i]-m*el[i]);
    cout << setprecision(3) << fixed << round(x) << " " << round(y) << endl;
  }

  return 0;
}


double round(double value){
  return floor(value*1000 + 0.5)/1000;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <set>
#include <vector>
#include <cstring>
#include <climits>
#include <queue>
using namespace std;

#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define EPS 1e-9

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