Go: package main

import (
  "fmt"
)

func main() {
  var a,b,c,d,e,f float64
  var x,y float64
  for _, err := fmt.Scan(&a, &b, &c, &d, &e, &f); err == nil;
   _, err = fmt.Scan(&a, &b, &c, &d, &e, &f) {
    y = (a*f-c*d)/(a*e-b*d)
    x = (c-b*y)/a
    fmt.Printf("%.3f %.3f\n", x,y)
  }
}

C++: #include<iostream>
#include<iomanip>
#define x_Formula(a,b,c,d,e,f) (c-(b*f)/e)/(a-(b*d)/e);
#define y_Formula(x,a,b,c) (c-(a*x))/b;

using namespace std;

double x;
double y;

void serch()
{
	int xx,yy;
	xx=x*10000;
	yy=y*10000;
	cout << xx << " " << yy << endl;
	if(xx>0)
		xx+=5;
	else
		xx-=5;
	if(yy>0)
		yy+=5;
	else
		yy-=5;
	x=xx/10000;
	y=yy/10000;
	cout << xx << " " << yy << endl;

}
int main()
{
	double num[6];
	int i;
	
	for(;cin >> num[0];)
	{
		for(i=1;i<6;i++)
			cin >> num[i];
		
		x=x_Formula(num[0],num[1],num[2],num[3],num[4],num[5])
		y=y_Formula(x,num[0],num[1],num[2])
		
		cout << setprecision(3);
		cout << setiosflags(ios::scientific);
		cout << fixed ;
		serch();
		cout << x << " " << y << endl;
	}
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<functional>
#include<iomanip>
using namespace std;
int main(){
	while (true) {
		double a, b, c, d, e, f;
		cin >> a >> b >> c >> d >> e >> f;
		if (cin.eof()) break;
		double x = (b * f - e * c) / (b * d - a * e);
		double y = (c * d - a * f) / (b * d - a * e);
		cout << setprecision(10) << fixed << x << " " << y << "\n";
	}
    return 0;
}

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

int main(void)
{
  double a,b,c,d,e,f;
  while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF){
    double det = a*e-b*d;
    double x = round((e*c-b*f)/det*1000)/1000.0;
    double y = round((-d*c+a*f)/det*1000)/1000.0;
    
    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;
    while(cin >> a >> b >> c >> d >> e >> f) {
        double ans_y = (c*d-f*a)/(b*d-e*a);
        double ans_x = (c - b*ans_y) / a;
        ans_x = static_cast<int>((ans_x * 10000 + 0.5)) / 10000.0;
        ans_y = static_cast<int>((ans_y * 10000 + 0.5)) / 10000.0;
        cout << fixed << setprecision(3) << ans_x << " " << ans_y << endl;
    }
}

C++: /* -*- coding:utf-8 -*- */

#include <iostream>
#include <iomanip>
#include <cstdlib>
#include <cmath>

using namespace std;

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


  while(cin >> a >> b >> c >> d >> e >> f, !cin.eof()) {
    double x,y;
    x = (e*c-b*f)/(a*e-b*d);
    y = (-c*d+a*f)/(a*e-b*d);
    cout << fixed << setprecision(3) << showpoint << ((fabs(x) < 1e-4) ? 0 : x) << ' ' << ((fabs(y) < 1e-4) ? 0 : y) << endl;
  }
  return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
int a,b,c,d,e,f;
double x,y;
while(cin >> a >> b >> c >> d >> e >> f){
y = (c/a-f/d)/(b/a-e/d);
x = (b*y-c)/a;
cout << x << " " << y << endl;
}
}

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

using namespace std;

int main(int argc, char *argv[]) {
  double a, b, c, d, e, f;
  vector<double> xy;

  while (true) {
    cin >> a >> b >> c >> d >> e >> f;
    if (cin.eof())
      break;
    a -= d * b / e;
    c -= f * b / e;
    double x = c / a;
    double y = (f - d * x) / e;
    xy.push_back(x);
    xy.push_back(y);
  }

  for (int i = 0; i < xy.size() / 2; i++)
    printf("%.3lf %.3lf\n", xy[i*2], xy[i*2+1]);
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
typedef long long LL;
int main(){
        double a,b,c,d,e,f;
        while(cin>>a,cin>>b>>c>>d>>e>>f){
           cout<<setprecision(3)<<fixed<<(b*f-e*c)/(b*d-e*a)<<" "<<(a*f-d*c)/(a*e-d*b)<<endl;
        }
	return(0);
}

C++: #include <stdio.h>
#include <math.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 <cstdio>

using namespace std;

int main()
{
	int 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 = (a * f - c * d) / (a * e - b * d);
		printf("%.3f %.3f\n", x + 0.0, y + 0.0);
	}
	return (0);
}

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

int main(){
	float a,b,c,d,e,f,x,y;
	
	scanf("%f%f%f%f%f%f",&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("%.3f %.3f",x,y);
	std::cout<<std::endl;
	
	
	return 0;
	
	}

C++: #include <stdio.h>

double sishagonyu(double num)	{
	
	//int num2;
	
	if (num == 0) return num;
	
	if (num > 0) { num += 0.0005; }
	else { num -= 0.0005; }
	
	num = (double)(int)(num * 1000) / 1000;
	
	//	num *= 1000;
	//	num2 = (int)num;
	//	num = num2;
	//	num /= 1000;
	
	return num;
}

int main() {
	
	//printf("%.3lf", sishagonyu((double)-0.0015));
	
	
	double a, b, c, d, e, f;
	double x, y;
	
	double n, m, h, i;
	
	while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF){
		
		//if (scanf("%lf %lf %lf %lf %lf %f", &a, &b, &c, &d, &e, &f) == EOF) break;
		
		//printf("input:\n%f %f %f\n%f %f %f\n", a, b, c, d, e, f);	//input
		
		if (a == 0) { y = c / b; }
		if (b == 0) { x = c / a; }
		if (d == 0) { y = f / e; }
		if (e == 0) { x = f / d; }
		
		n = a / d;
		
		//j = d * n;
		h = e * n;
		i = f * n;
		
		//printf("%f %f %f\t%f %f\t%f\n", a, b, c, h, i, n);
		
		m = b - h;
		y = c - i;
		//printf("%f %f\n", m, y);
		
		if(y <= 0.0004 && y >= -0.0005) { 
			
			//printf("y = 0\n");
			y = 0; 
			
		} else {
			
			y /= m;
			//printf("%f\n", y);
			
			i = c - (b * y);
			x = i / a;
			
			//printf("x = %f, y = %f\n", x, y);
			
			x = sishagonyu(x);
			y = sishagonyu(y);
			
		}
		//printf("%f %f\n", x, y);
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}
//2.2 3.3 22.24706 3.2 8.7 50.12932
//3.2777 4.5564

//1 2 3 4 5 6
//-1.000 2.000

//2 -1 -2 -1 -1 -5
//1.000 4.000

//2 -1 -3 1 -1 -3
//0.000 3.000

// 2 -1 -3 -9 9 27
// 0.000 3.000

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

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

}

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

using namespace std;

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

  return 0;
}

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

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

C++: #include <cstdio>

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

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

	return 0;
}