Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	for scanner.Scan() {
		strNums := strings.Fields(scanner.Text())
		nums := []int{}
		for _, strNum := range strNums {
			num, _ := strconv.Atoi(strNum)
			nums = append(nums, num)
		}
		a := nums[0]
		b := nums[1]
		c := nums[2]
		d := nums[3]
		e := nums[4]
		f := nums[5]
		var mulA, mulD int
		if a < 0 {
			mulA = a * -1
		} else {
			mulA = a
		}
		if d < 0 {
			mulD = d * -1
		} else {
			mulD = d
		}
		a *= mulD
		b *= mulD
		c *= mulD
		d *= mulA
		e *= mulA
		f *= mulA

		if d < 0 {
			d *= -1
			e *= -1
			f *= -1
		}

		bE := b - e
		cF := c - f
		if bE == 0 {
			bE = 1
		}
		y := cF / bE
		x := (c - (y * b)) / a

		fmt.Printf("%d.000 ", x)
		fmt.Printf("%d.000\n", y)
	}
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

int main()
{
//	cut here before submit 
//	freopen("testcase.se2", "r", stdin);
	string str = "";

	while (getline (cin, str )){
		// ax + by = c
		// dx + ey = f
		int a, b, c, d, e, f;
		stringstream ss(str);
		ss >> a >> b >> c >> d >> e >> f;
		// [ a b ][x] = [c]
		// [ d e ][y]   [f]
		// [x] = [e -b][c]
		// [y]   [-d a][f]/D
		double x,y;
		double D = (double)(a*e - b*d);

		y = (double)(-d*c + a*f)/D;
		x = ((double)c - (double)b*y)/(double)a;
		if (fabs(x) < 1.0e-6){
			x = 0.0;
		} // end if
		if (fabs(y) < 1.0e-6){
			y = 0.0;
		} // end if
		cout.setf( ios::fixed ); 
		cout.precision(3);
		cout << x << ' ' << y << endl;
	} // end for

	return 0;
}

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

using namespace std;

double roundOff(double);
int main(void){
	for(int a, b, c, d, e, f; cin >> a >> b >> c >> d >> e >> f;){
		double delta = a * e - b * d;
		double x = roundOff((c * e - b * f) / delta);
		double y = roundOff((a * f - c * d) / delta);

		cout.setf(ios::showpoint);
		cout << setprecision(3) << x << " " << y << endl;
	}
	return 0;
}

double roundOff(double a){
	a*=1000;
	a = int(a + 0.5 - (a < 0));
	a/=1000.;
	return a;
}

C++: #include <iostream>
#include <algorithm>
#include <cstdio>
#include <string>
#include <sstream>
 
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 - f * b) / (a * e - d * b);
    	y = (a * f - d * c) / (a * e - d * b);
    	printf("%.3f %.3f\n", x, y);
    }
    return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<iomanip>
#include<math.h>
using namespace std;
main(){
	double x[2][3],n,ans[2],tmp;
	while(1){
		for(int i=0;i<=1;++i){
			for(int j=0;j<=2;++j){
				cin>>x[i][j];
				ans[i]=0;
			}
		}
		n=x[0][0]*x[1][1]-x[0][1]*x[1][0];
		for(int i=0;i<=1;++i){
			for(int j=0;j<=1;++j){
				x[i][j]/=n;
			}
		}
		double tmp;
		tmp=x[1][1];
		x[1][1]=x[0][0];
		x[0][0]=tmp;
		x[0][1]*=-1;
		x[1][0]*=-1;

		for(int i=0;i<=1;++i){
			for(int j=0;j<=1;++j){
				ans[i]+=x[i][j]*x[j][2];
			}
		}
		cout<<fixed<<setprecision(3)<<ans[0]<<" "<<ans[1]<<endl;
	}
}

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

int main() {
	int a, b, c, d, e, f;
	int cnt = 0;
	std::vector<double> x_vector;
	std::vector<double> y_vector;

	while (cin >> a >> b >> c >> d >> e >> f) {
		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++) {
		std::cout << std::fixed;
		std::cout << std::setprecision(3) << x_vector[i] << " ";
		std::cout << std::setprecision(3) << y_vector[i] << endl;
	}

	return 0;
}

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

int main(){
	double a[6];
	double x,y;
	cout<< setprecision(4) << setiosflags(ios::showpoint);
	while(true){
		cin >> a[0];
		cin >> a[1];
		cin >> a[2];
		cin >> a[3];
		cin >> a[4];
		cin >> a[5];
		if(cin.eof())
			break;
			
		x = (a[4]*a[2]-a[1]*a[5])/(a[0]*a[4]-a[1]*a[3]);
		y = (-a[3]*a[2]+a[0]*a[5])/(a[0]*a[4]-a[1]*a[3]);
		if(x == 0)
			x = 0;
		if(y == 0)
			 y = 0;
			 
		cout << x << " " << y << endl;
	}
	return 0;
}

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

using namespace std;

double a, b, c, d, e, f;


double x(double, double, double, double, double, double) {

	return (c*e - b*f) / (a*e - b*d);
}

double y(double, double, double, double, double, double) {

	return (a*f - c*d) / (a*e - b*d);
}

double round3(double dat){

	int fct;
	fct = (int)pow(10, 3);
	dat *= fct;
	dat = round(dat);
	dat /= fct;
	return dat;
}

int main()
{
	double x1, x2, y1, y2;
	cin >> a >> b >> c >> d >> e >> f;

	x1 = x(a, b, c, d, e, f);
	y1 = y(a, b, c, d, e, f);

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

	x2 = x(a, b, c, d, e, f);
	y2 = y(a, b, c, d, e, f);

	cout << fixed << setprecision(3) << round3(x1) << " " << round3(y1) << endl;
	cout << fixed << setprecision(3) << round3(x2) << " " << round3(y2) << endl;

	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	double a[60000]={0};
	int i=0;
	while(cin>>a[i++]);
	int n=i-1;
	for(int j=0;j<n;j+=6){
		double x=0,y=0;
		if(a[j+3]!=0&&a[j]!=0){
			double k=a[j]/a[j+3];
			a[j+3]*=k,a[j+4]*=k,a[j+5]*=k;
			y=(a[j+2]-a[j+5])/(a[j+1]-a[j+4]);
			x=(a[j+2]-a[j+1]*y)/a[j];
		}else if(a[j]==0){
			x=a[j+5]/a[j+3];
			y=a[j+2]/a[j+1];
		}else if(a[j+3]==0){
			x=a[j+2]/a[j];
			y=a[j+5]/a[j+4];
		}
		cout<<x<<" "<<y<<endl;
	}
	return 0;
}

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

const double EPS=1e-6;

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=(a*f-c*d)/(a*e-b*d);
		if(x>-EPS)x=abs(x);
		if(y>-EPS)y=abs(y);
		cout<<fixed<<setprecision(3)<<x<<" "<<y<<endl;
	}
	return 0;
}

C++: #include <cmath>
#include <ctime>
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <bitset>
#include <functional>
#include <numeric>
#include <utility>
#include <iomanip>
#include <cstdio>
#include <cctype>
#include <queue>
#include <complex>
#include <climits>

typedef long long ll;

using namespace std;

int main(void){
	while(1){
		int a,b,c,d,e,f;
		if(cin >> a == 0) break;
		cin >> b >> c >> d >> e >> f;
		double x, y;
		x = (double)(e*c-b*f)/(a*e-b*d);
		y = (double)(a*f-c*d)/(a*e-b*d);

		if(0.0005 > x && x > -0.0005) x = 0.0;
		if(0.0005 > y && y > -0.0005) y = 0.0;

		cout << setprecision(3) << setiosflags(ios::fixed) << x << " " << y << endl;
	}

	return 0;
}

C++: #include <cstdio>

using namespace std;

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

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

    return 0;
}

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)!=-1){
		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);
		printf("%0.3f %0.3f\n",x,y);
	}
	
	
	return 0;
}

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

int main(){

	float a,b,c,d,e,f;

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