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<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){
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>
#include <iomanip>
using namespace std;

int main(void){
	double a,b,c,d,e,f;
	//int X[2][2]={ {c,b}, {f,e} };
	//int Y[2][2]={ {a,c}, {d,f} };
	double x,y;
	double A,X,Y;
	while(cin>>a>>b>>c>>d>>e>>f){
		A=a*e-b*d;
		X=c*e-b*f;
		Y=a*f-c*d;
		x=(1/A)*X;
		y=(1/A)*Y;
		cout << fixed << setprecision(3) << x << ' ' << y 
	}
	
	return 0;
}

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

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

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

using namespace std;

double delta(double o, double p, double q , double r, double s, double t) {

	//cout << "o=" << o << "s=" << s << "v=" << "r=" << "o*s-p*r=" << (o*s-p*r)  << endl;

	// |o  p ||x|   |q|
	// |r  s ||y| = |t|

	return (o*s-p*r);//a???o b???p c???q d???r e???s f???t
}

double deltacfbe(double o, double p, double q , double r, double s, double t) {

	//cout << "o=" << o<< "s=" << s << "p=" << "r=" << "q*s-p*t=" << q*s-p*t  << endl;

	// x = |q  p | /delta
	//     |t  s | 

	return (q*s-p*t);
}

double deltaadcf(double o, double p, double q , double r, double s, double t) {

	//cout << "o=" << o<< "s=" << s << "p=" << "r=" << "o*t-q*r=" << o*t-q*r  << endl;

	// y = |o  q | /delta
	//     |r  t | 

	return (o*t-q*r);
}

int main() {

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

	cout.showpoint;



	cout << fixed << setprecision(3) << (deltacfbe(a,b,c,d,e,f)/delta(a,b,c,d,e,f))  << " " << (deltaadcf(a,b,c,d,e,f)/delta(a,b,c,d,e,f)) << endl;
	
	}

	return 0;
}

C++: #include<iostream>
int main() {
  float a[6];
  while(scanf("%1f %1f %1f %1f %1f %1f",&a[0],&a[1],&a[2],&a[3],&a[4],&a[5])!=EOF) {
  float x,y;
  x=(a[2]*a[4]-a[1]*a[5])/(a[0]*a[4]-a[1]*a[3]);
  y=(a[2]*a[3]-a[0]*a[5])/(a[1]*a[3]-a[0]*a[4]);
  printf("%.3f %.3f\n",x+0.000499999999,y+0.000499999999);
  }
}

C++: #include <stdio.h>

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

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

using namespace std;
/*
 * Simultaneous Equation
 * ax + by = c
 * dx + ey = f
 */
int main()
{
    vector <double> xlist;
    vector <double> ylist;
    double a, b, c, d, e, f;
    double x = 0,y = 0;
    while(cin >> a >> b >> c >> d >> e >> f)
    {
        double dA = a*e - b*d;
        if(dA == 0)
        {
            //Not Calc
            return -1;
        }
        x = 1/dA*(e*c-b*f);
        y = 1/dA*(-d*c+a*f);
        xlist.push_back(x);
        ylist.push_back(y);

    }
    for(int i; i < (int)xlist.size(); i++)
    {
        x = xlist[i];
        y = ylist[i];
        if(x == 0)
        {
            x = fabs(x);
        }
        if(y == 0)
        {
            y = fabs(y);
        }
        printf("%.3f %.3f\n",x,y);
    }

    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  double a[2][3];
  while(cin>>a[0][0]>>a[0][1]>>a[0][2]>>a[1][0]>>a[1][1]>>a[1][2]){
    if(a[0][0]==0)
      for(int i=0;i<3;i++)swap(a[0][i],a[1][i]);
    for(int i=0;i<2;i++){
      for(int j=i+1;j<3;j++)
	a[i][j]/=a[i][i];
      a[i][i]=1;
      for(int j=0;j<2;j++){
	if(j==i)continue;
	double t=a[j][i];
	for(int k=i;k<3;k++)
	  a[j][k]-=t*a[i][k];
      }
    }
    printf("%.3f %.3f\n",a[0][2],a[1][2]);
  }
  return 0;
}

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

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

void solve(int a, int b, int c, int d, int e, int f) {
	double x = (f - (double)e*c/b) / (d - (double)e*a/b);
	double y = (c - a*x) / b;
	if (x == 0) x = 0.000;
	if (y == 0) y = 0.000;
	printf("%4.3f %4.3f\n", x, y);
}

int main() {
	int a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		solve(a,b,c,d,e,f);
	}
	return 0;
}

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



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

C++: #include <cstdio>

float a,b,c,d,e,f;
int main (){
  scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f);
  float x,y;
  x=(f*b/e-c)/(d*b/e-a);
  y=(f*a/d-c)/(d*a/d-a);
  printf("%f %f",x,y);
}

C++: /* Blaces() are very important. */
/* It calls the memory from LISP world. :-) */

#include <stdio.h>

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

C++: #include<stdio.h>
#define N 1000000
struct{double a,b,c,d,e,f;}data[N];

int main(){
    int i,L;
    double a,b,c,d,e,f;
    double x,y;
    for(i=0; i<N&&scanf("%d %d %d %d %d %d",&data[i].a,&data[i].b,&data[i].c,&data[i].d,&data[i].e,&data[i].f)!=EOF; i++);
    L=i;
    for(i=0;i<L;i++){
        a=data[i].a; b=data[i].b; c=data[i].c; d=data[i].d; e=data[i].e; f=data[i].f;
        x=(1/(a*e-b*d))*(e*c-b*f);
        y=(1/(a*e-b*d))*(a*f-d*c);
        printf("%4.3f %4.3f\n",x,y);
    }
    return 0;
}

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