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 <stdio.h>

int main(){
	int i,j;
	int a,b,c,d,e,f;
	int tmp;
	float x,y;
		
	while(scanf("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f)!=EOF){
		tmp = d;
		d*=a; e*=a; f*=a;
		a*=tmp; b*=tmp; c*=tmp;
		y=(float)((c-f)/(b-e));
		x=(float)((c-b*y)/a);
		if(x==-0.000000){
			x = 0.000000;
		}
		if(y==-0.000000){
			y = 0.000000;
		}
		printf("%0.3f %0.3f\n",x,y);
	}
	
	
	return 0;
}

C++: #include<iostream>

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

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

double sisya(double x)
{
	double a = x;
	if(x < 0)
		a = -x;
			a = a*1000;
	a = a - static_cast<double>(static_cast<int>(a));
	a = a+0.5;
	if(a >= 1.0){
		return x + 0.001;
	}
	return x;
}

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

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<cmath>
#include<cstdio>
#include<string>


using namespace std;


double solveY(int a,int b,int c,int d,int e,int f){
	double ret;
	ret=(double)(a*f-d*c)/(a*e-b*d);
	return ret;
}

int main(){
	while(1){
		int a,b,c,d,e,f;
		if( !(cin>>a>>b>>c>>d>>e>>f) )break;
		double y=solveY(a,b,c,d,e,f);
		double x=(c-b*y)/a;
		printf("%5.3lf %5.3lf\n",x,y);
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
int a,b,c,d,e,f;
float A,B,C,D,E,F,X,Y;
while(cin>>a>>b>>c>>d>>e>>f){
C=c;
B=b;
A=a;
E=e*a/d;
F=f*a/d;
Y=(C-F)/(B-E);
X=(C-B*Y)/A;
cout<<X<<Y<<endl;
}
}

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

C++: 
#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <stack>
#include <cctype>
#include <complex>
#include <vector>
#include <algorithm>

using namespace std;


bool solve(){

	float a,b,c,d,e,f,g;
	while(cin>> a>> b>> c>> d>> e>> f){
		float x = (1.0/(a*e-b*d)) * (e*c - b*f);
		float y = (1.0/(a*e-b*d)) * (-c*d + a*f);
		if(-0.001<x && x<=0) x = 0;
		if(-0.001<y && y<=0) y = 0;
		printf("%.3f %.3f",x, y);
		printf("\n");
	}
	return true;
}

int main(){
	cout.setf(ios::fixed);
	cout.precision(10);
	solve();

	return 0;
}

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

int main(void){
	float a,b,c,d,e,f;
	float 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);
		printf("%.3f %.3f\n",x,y);
	}

}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#define rep(x,to) for(x=0;x<to;x++)
#define rep2(x,from,to) for(x=from;x<to;x++)

using namespace std;


int main(void){

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

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

int main(){
	int count = 0;
	double x[100],y[100];
	double a, b, c, d, e, f;
	while(cin >> a >> b >> e >> c >> d >> f){
		x[count] = (e*d-b*f)/(a*d-b*c);
		y[count] = (a*f-e*c)/(a*d-b*c);
		if(x[count] == -0){
			x[count] = 0;
		}
		if(y[count] == -0){
			y[count] = 0;
		}
		count++;
	}
	for(int i = 0; i < count; i++){
		cout << fixed << setprecision(3) << x[i] << " " << y[i] << endl;
	}
}

C++: 
/* vo00_04.cpp */
#include <iostream>
#include <iomanip>
#include <cmath>
#include <cstdio>
using namespace std;

int is_double(double dl);
double m_round(double d);
int dmax(int d1, int d2) { return (d1 < d2) ? d2 : d1; }

int main()
{
	double x1, y1, a1;
	double x2, y2, a2;
	double x, y;
	bool f_x, f_y;

	while (true) {
		cin >> x1 >> y1 >> a1 >> x2 >> y2 >> a2;
		if (cin.eof()) break;
		


		f_x = false; f_y = false;

		int p = dmax(dmax(is_double(x1), is_double(x2)), dmax(is_double(y1), is_double(y2)));
		if (p) { p *= 10; x1 *= p; x2 *= p; y1 *= p; y2 *= p; }

		if (x1 && x2) {
			int temp = x1;
			x1 *= x2; y1 *= x2; a1 *= x2;
			x2 *= temp; y2 *= temp; a2 *= temp;

			double y3 = y2 - y1, a3 = a2 - a1;

			y = a3 / y3;
			f_y = true;
		}

		if (y1 && y2) {
			int temp = y1;
			x1 *= y2; y1 *= y2; a1 *= y2;
			x2 *= temp; y2 *= temp; a2 *= temp;

			double x3 = x2 - x1, a3 = a2 - a1;

			x = a3 / x3;

			f_x = true;
		}

		if (!f_x || !f_y) {
			// どちらかに0があれば
			if (!x1) { y = a1 / y1; f_y = true; }
			else if (!x2) { y = a2 / y2; f_y = true; }

			if (!y1) { x = a1 / x1; f_x = true; }
			else if (!y2) { x = a2 / x2; f_x = true; }

			if (f_x) {
				if (x1) { x1 *= x; a1 -= x1; y = a1 / y1; }
				else if (x2) { x2 *= x; a2 -= x2; y = a2 / y2; }

				f_y = true;
			}
			if (f_y) {
				if (y1) { y1 *= y; a1 -= y1; x = a1 / x1; }
				else if (y2) { y2 *= y; a2 -= y2; x = a2 / x2; }

				f_x = true;
			}
		}

		if (f_x && f_y) {
			x = m_round(x); y = m_round(y);
			printf("%.3lf %.3lf\n", x, y);
		}
	}

	return 0;
}

int is_double(double dl)
{
	dl = fabs(dl);
	int d = (int)dl;
	double temp = dl - (double)d;

	if (!temp) return 0;

	else {
		int i;
		for (i = 0; temp < 1; ++i) temp *= 10;

		return i;
	}
}

double m_round(double d)
{
	bool flag = false;
	if (d < 0) { flag = true; d = -d; }

	d *= 1000;
	d += 0.5;

	int t1 = (int)d;
	double t2 = d - (double)t1;
	d -= t2;

	d /= 1000;

	if (flag) { d = -d; }

	return d;
}

C++: #include <iostream>
#include <iomanip>
using namespace std;
int main()
{
	double a,b,c,d,e,f,x,y;
	while(cin>>a>>b>>c>>d>>e>>f)
	{
		cout.precision(3);
		x=(c*e-b*f)/(a*e-b*d);
		y=(a*f-c*d)/(a*e-b*d);
		cout<<setiosflags(ios::fixed)<<setprecision(3)<<x<<" "<<y<<endl;
	}
	return 0;
}

C++: #include <iostream>
#include <stdlib.h>
#include <string.h>
#include <sstream>
#include <iostream>
#include <math.h>
#include <iomanip>

using namespace std;

string float_to_string(float f, int digits)
{
  if (f == 0) {
    f = 0;
  }
  ostringstream oss;
  oss << setprecision(digits) << setiosflags(ios::fixed) << f;
  return oss.str();
}

void calc_and_output(int *c)
{
  float x = (float)(c[1]*c[5]-c[2]*c[4])/(c[1]*c[3]-c[0]*c[4]);
  float y = (float)(c[0]*c[5]-c[2]*c[3])/(c[0]*c[4]-c[1]*c[3]);

  cout << float_to_string(x, 3) << " " << float_to_string(y, 3) << endl;
}

int main(int argc, char const* argv[])
{
  int c[6];

  string line;
  while (getline(cin, line)) {
    istringstream iss(line);
    int val;
    int c[6];
    for (int i = 0; i < 6; i++) {
      iss >> val;
      c[i] = val;
    };

    calc_and_output(c);
  }

  return 0;
}

C++: /*http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0004&lang=jp*/

#include <iostream>

using namespace std;

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