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

int main()
{
	double x[2],y[2],z[2];
	double X,Y;

	while(cin >> x[0] >> y[0] >> z[0] >> x[1] >> y[1] >> z[1]){
		y[0] *= x[1];	z[0] *= x[1];
		y[1] *= x[0];	z[1] *= x[0];

	
		Y = (z[0]-z[1]) / (y[0]-y[1]);

		y[0] /= x[1];
		z[0] /= x[1];
		z[0] -= y[0] * Y;

		X = z[0]/x[0];
	
		cout.precision(3);
		cout.setf(ios::fixed);

		cout << X << " "<< Y << endl;

	}
	return 0;
}

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

int rintv(double v) 
{
	return (v > 0) ? ((int)(v + 0.5)) : ((int)(v - 0.5)); 
}

double round_off(int dec_p, double value)
{
	double shift = pow(10, -dec_p);
	int intv = rintv(shift * value);
	return intv / shift;
}

int main()
{
	std::vector<double> x, y;
	double a, b, c, d, p, q;
	while (scanf("%d %d %d %d %d %d", &a, &b, &p, &c, &d, &q) != EOF)
	{
		x.push_back((d*p - b*q) / (a*d - b*c));
		y.push_back((a*q - c*p) / (a*d - b*c));
	}

	for (int i = 0; i < x.size(); ++i)
		std::cout << round_off(-4, x[i]) << " " << round_off(-4, y[i]) << std::endl;
	return 0;
}

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

double mround(double a){
	if(a<0)return a-0.0005;
	return a+0.0005;
}
int main(){
	double a[6];
	double x,y;
	while(cin>>a[0]>>a[1]>>a[2]>>a[3]>>a[4]>>a[5]){
		double b=a[1]/a[4];
		for(int i=0;i<3;i++)a[3+i]*=b;
		x=(a[2]-a[5])/(a[0]-a[3]);
		y=(a[2]-x*a[0])/a[1];

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


	return 0;
}

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

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

using namespace std;

int main()
{
	double a, b, c, d, e, f;
	double copya, copyb, copyc;
	double odd;//倍率
	double x, y;

	while (cin >> a >> b >> c >> d >> e >> f)
	{
		copya = a, copyb = b, copyc = c;

		odd = a / d;

		d *= odd, e *= odd, f *= odd;

		a -= d, b -= e, c -= f;

		y = c / b;
		x = (copyc - copyb*y) / copya;

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

	}


	return 0;
}

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

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

using namespace std;

int main()
{
	int a[1000],b[1000],c[1000],d[1000],e[1000],f[1000];
	float x[1000],y[1000];
	int len=0;
	while (cin >> a[len] >> b[len] >> c[len] >> d[len] >> e[len] >> f[len])
		len++;

	for (int i=0; i < len; i++) {
		x[i] =  (double)((e[i] * c[i] - b[i] * f[i]) / (double)(e[i] * a[i] - b[i] * d[i]));
		y[i] =  ((c[i] * d[i] - f[i] * a[i]) / (b[i] * d[i] - a[i] * e[i]));
	}
	for (int i=0; i < len; i++) {
		printf("%.3lf %.3lf\n",x[i],y[i]);
	}
	return 0;
}

C++: #define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

#include <bits/stdc++.h>
using namespace std;

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