Go: package main

import (
	"fmt"
)

func main() {
	for {
		var a, b, c, d, e, f float64
		i, _ := fmt.Scan(&a, &b, &c, &d, &e, &f)
		if i == 0 {
			break
		}

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

		fmt.Printf("%.3f %.3f\n", x, y)
	}
}

C++: #include <stdio.h>

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

	while(scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != -1){
		

		ratio = -1 * ((double)d / (double)a);
		alpha = ratio * b;
		beta = ratio * c;
		//printf("%f %f %f\n", ratio, alpha, beta);

		y = (double)(beta + f) / (alpha + e);
		x = (double)(f - e * y) / d;

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

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

	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",x,y);
	}
	return 0;
}

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

int main()
{
	double a,b,c,d,e,f;
	while(true){
		cin >> a;
		if(cin.eof())
			break;
		cin >> b >> c >> d >> e >> f;
		double sum = a;
		a = a*d;
		b = b*d;
		c = c*d;
		d = d*sum;
		e = e*sum;
		f = f*sum;
		double x=0.0,y=0.0;
		y = (c-f)/(b-e);
		if(y==-0.0)
			y=0;
		x = (c-b*y)/a;
		if(x==-0.0)
			x=0;
		cout.precision(3);
		cout << fixed <<x;
		cout << ' ' ;
		cout.precision(3);
		cout << fixed << y;
		cout << endl;

	}
	return 0;
}

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

using namespace std;

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

  while (cin >> a >> b >> c >> d >> e >> f) {
    a -= d * b / e;
    c -= f * b / e;
    double x = c / a;
    double y = (f - d * x) / e;
    if (x >= 0)
      x = (int)(x * 1000 + 0.5);
    else
      x = (int)(x * 1000 - 0.5);
    x /= 1000;
    if (y >= 0)
      y = (int)(y * 1000 + 0.5);
    else
      x = (int)(y * 1000 - 0.5);
    y /= 1000;

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

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

C++: #include<iostream>
#include<algorithm>
#include<cmath>
#include<cstdio>
using namespace std;
int main(){
	double a,b,c,d,e,f,n[20];
	while(cin>>a>>b>>c>>d>>e>>f){
	double x,y;
	int w;
	if(a == 0){
		n[0] = 0;
		n[1] = 0;
	}else{
		n[0] = c / a;
		n[1] = b / a;
	}
	if(d == 0){
		n[2] = 0;
		n[3] = 0;
	}else{
		n[2] = f / d;
		n[3] = e / d;
	}
	if(b == 0){
		n[4] = 0;
		n[5] = 0;
	}else{
		n[4] = c / b;
		n[5] = a / b;
	}
	if(e == 0){
		n[6] = 0;
		n[7] = 0;
	}else{
		n[6] = f / e;
		n[7] = d / e;
	}
	if(n[1] - n[3] == 0){
		y = 0;
	}else{
		y = (n[0] - n[2]) / (n[1] - n[3]);
	}
	if(n[5] - n[7] == 0){
		x = 0;
	}else{
		x = (n[4] - n[6]) / (n[5] - n[7]);
	}
	x = x * pow(10, - 5);
	double xx = x + 0.5;
	xx = xx * pow(10,5);
	y = y * pow(10, - 5);
	double yy = y + 0.5;
	yy = yy * pow(10,5);

	printf("%03f,%03f\n",&xx,&yy);



}
return 0;
}

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

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

C++: #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 = (f*a-c*d)/(e*a-b*d);
        x = (c-b*y)/a;
        printf("%.3lf %.3lf\n",x,y);
    }
}

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

using namespace std;

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

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

int main(){
	double a,b,c,d,e,f;
	while( cin >> a >> b >> c >> d >> e >> f){
		double s = a * e - b * d;
		double x = e * c + -b * f;
		double y = -d * c + a *f;
		if(abs(x)<1e-9)x=0;
		if(abs(y)<1e-9)y=0;
		
		printf("%.3lf %.3lf\n",x/s,y/s);
	}
}

C++: #include <stdio.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 ax = a / e, cx = c / e;
    printf("%f ", (cx - f) / (ax - d));
    b /= d, c /= d;
    printf("%f\n", (c - f) / (b - e));
  }
  return 0;
}

C++: /*
  Name : Dipu Kumar Mohanto
  Problem : C
  BRUR Weekend Practice Contest on May 19, 16
*/
#include <algorithm>
#include <iostream>
#include <iterator>
#include <numeric>
#include <sstream>
#include <fstream>
#include <cassert>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <string>
#include <cstdio>
#include <vector>
#include <cmath>
#include <queue>
#include <deque>
#include <stack>
#include <list>
#include <map>
#include <set>

#define SET(a) memset(a, -1, sizeof(a));   /// When dp[] & use for blank all position
#define CLR(a) memset(a, 0, sizeof(a));     /// When dp[] & use for NULL or 0 all position
#define MEM(x,y) memset(x,y,sizeof(x));  /// When dp[][] & use for blank all position
#define maxall(v) *max_element(v.begin(),v.end());  /// Find maximum value from the vector
#define minall(v) *min_element(v.begin(),v.end());   /// Find minimum value from the vector
#define Sort(v) sort(v.begin(),v.end());     /// Sort the vector
#define un(v) Sort(v), v.erase(unique(v.begin(),v.end()),v.end());   /// Erase duplicate value from the vector
#define max3(a,b,c) max(a,max(b,c));    /// Find maximum value among 3 values
#define min3(a,b,c) min(a,min(b,c));        /// Find minimum value among 3 values
#define TFtoL(a) transform(a.begin(), a.end(), a.begin(), :: tolower) /// Convert the uppercase letter to lowercase in C++
#define TFtoU(a) transform(a.begin(), a.end(), a.begin(), :: toupper)
#define ull unsigned long long
#define PI 2*acos(0.0)

bool cmp(int a, int b){
     return a>b; }
int comp(void const *a, void const *b)  ///  Function for qsort $$ qsort(Name, Size, sizeof(int), comp);
{
    int *p, *q;
    p = (int *) a;
    q = (int *) b;
    return (*p - *q);
}
const int N = 3e5+2;
const int INF=0x7FFFFFFF;    /// Heighest value of int

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 - c*e) / (b*d - a*e);
        y = (a*f - c*d) / (a*e - b*d);

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

    return 0;
}

C++: #include<stdio.h>
int main(void) {
	int a, b, c, d, e, f, g, h=0;
	while (h<2)
	{
		scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f);
		for (double x = -1000; x <= 1000; x++)
		{
			for (double y = -1000; y <= 1000; y++)
			{
				if (a*x + b*y == c&&d*x + e*y == f)
				{
					printf("%.4f %.4f", x, y);
				}
			}
		}
		h++;
	}

	return 0;
}

C++: #include <cstdio>

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

C++: #include"stdio.h"


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