Go: package main

import "fmt"

func main() {
	var resultX, resultY [100]float32
	var count int
	for {
		var a, b, c, d, e, f, x, y float32
		fmt.Scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)
		if a == 0 {
			break
		}
		//Simultaneous equation
		y = (((a * f) - (d * c)) / ((a * e) - (b * d)))
		x = ((c - (b * y)) / a)
		resultX[count] = x
		resultY[count] = y
		count++
	}
	for i := 0; i < count; i++ {
		fmt.Printf("%.3f %.3f\n", resultX[i], resultY[i])
	}
}

C++: #include<stdio.h>
#include<algorithm>
using namespace std;
int main(){
         double a,b,c,d,e,f,x,y;
		 scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f);
		 x = (c*e-b*f)/(a*e-b*d);
		 y = (c -a*x)/b;
		 printf("%f %f\n",x ,y);
		 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 y = (f+-d*c)/(-b*d+e);
        double x = (c-b*y)/a;
        printf("x = %.3f y = %.3f\n",x,y);
    }
    return 0;
}

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

int main()
{
	for (double a, b, c, d, e, f; cin >> a >> b >> c >> d >> e >> f; cout << fixed << setprecision(4) << (c*e - b*f) / (a*e - b*d) << ' ' << (a*f - c*d) / (a*e - b*d) << endl);
	return 0;
}

C++: #include<stdio.h>
main(){
  double a,b,c,d,e,f,x,y;
  while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!="EOF"){
    x = (c*e-b*f)/(a*e-b*d);
    y = (a*f-c*d)/(a*e-b*d);
    printf("%f %f\n",x,y);
  }
}

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

using namespace std;

double round(double d){
	int k = (int)(d*10000)%10;
	int k2 = (int)(d*100000)%10;
	int k3 = (int)(d*1000000)%10;
	int k4 = (int)(d*10000000)%10;
	return (k>=5 || k == 4 && k2 == 9 && k3 == 9 && k4 == 9)? d-((double)k/10000)+0.001: d- ((double)k/10000);
}

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

	while(cin >> a >> b >> c >> d >> e >> f){
		double del = 1.0/(a*e - d*b);
		printf("%0.3f %0.3f\n", round(del*(e*c-b*f)), round(del*(a*f-d*c)));
	}
}

C++: const int tt = 10000;

#include<iostream>
#include<string>
#include<sstream>
using namespace std;

string toStr(int n);
string intToString(int n);

int main() {
  int a, b, c, d, e, f;
  
  while(cin >> a >> b >> c >> d >> e >> f) {
    c = c * tt;
    f = f * tt;

    int det = a * e - b * d;

    int x = ( e * c - b * f) / det;
    int y = (-d * c + a * f) / det;
//    cout << x << y << endl;

    cout << toStr(x) << " " << toStr(y) << endl;
  }
}

string toStr(int n) {
  string pm, val;
  
  if (n < 0) {
    pm = "-";
    n = -n;
  } else {
    pm = "";
  }

  int ipart = n / tt;
  int fpart = (n - ipart * tt) + tt + 5;

  val = pm + intToString(ipart) + "." + intToString(fpart).substr(1, 3);
  return val;
}

string intToString(int n) {
  stringstream ss;
  ss << n;
  return ss.str();
}

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

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

	while ((cin >> a >> b >> c >> d >> e >> f)){

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

		x *= 10000;
		x = x + 0.5 - (x < 0);
		x = (int)x;
		x /= 10000;

		y *= 10000;
		y = y + 0.5 - (y < 0);
		y = (int)y;
		y /= 10000;


		cout << setprecision(4) << showpoint << x << " " << y << endl;
	}

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

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

double ff(double r){
	r*=pow(10,3);
	r = round(r);
	r*=pow(10,-3);
	return r;
}

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

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<cstdio>
#include <iomanip>

using namespace std;

int main(){
	
	float a, b, c, d, e, f;
	float x, y;
	
	cin >> a >> b >> c >> d >> e >> f;
	
	if((a != 0) && (e != 0) || (b != 0) && (d != 0)){
		x = ((c * e) - (b * f)) / ((a * e) - (b * d));
		y = (c - a * x) / b;
	}else if ((b != 0)){
		x = 0;
		y = c / b;
	}else {
		x = 0;
		y = 0;
	}
	
	if (x == 0){
		x = 0;
	}else if (y == 0){
		y = 0;
	}
	
	cout << fixed << setprecision(3) << x << "," << y << endl;
	
	return 0;
}

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


int main(void) {
    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 = (c*d - a*f) / (b*d - a*e);
        
        cout << x << ' ' << y << endl;
    }
}

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

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

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


#ifndef DEBUG 
#define fprintf (void)
#endif 

int main(void){
	
	double a,b,c,d,e,f;
	double x,y,div;
	int i;
	

	while(scanf("%lf",&a)!=EOF){
		scanf("%lf",&b);
		scanf("%lf",&c);
		scanf("%lf",&d);
		scanf("%lf",&e);
		scanf("%lf",&f);
		
		div=b*d-a*e;
		x=(b*f-c*e)/div;
		y=(c*d-a*f)/div;
		
		x=round(x);
		y=round(y);
		
		if(x==-0){
			fprintf(stdout,"yabaix\n");
			x=fabs(x);
		}
		
		if(y==-0){
			fprintf(stdout,"yabaiy\n");
			y=fabs(y);
		}
		
		printf("%lf %lf\n",x,y);
	}
	
	return 0;
}