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 <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define MOD 1000000007 //10^9+7
#define INF 1000000000 //10^9

pair<double, double>equ2(int a,int b,int c,int d,int e,int f){
    double det=1.0/(a*e-b*d);
    double x=(double)(c*e-b*f)*det;
    double y=(double)(a*f-c*d)*det;
    if (x==-0) x=0;if (y==-0) y=0;
    return pair<double, double>(x,y);
}

int main ()
{
    string str;
    while (!cin.eof()) {
        int a,b,c,d,e,f;
        
        cin>>a>>b>>c>>d>>e>>f;
        
        pair<double,double> ans=equ2(a,b,c,d,e,f);
        
        printf("%.3f %.3f\n",ans.first+0.0005,ans.second+0.0005);
    }
    return 0;
}

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

    return 0;
}

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

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

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

void func(double, int);

int main(){

	double a, b, c, d, e, f, x, y, del;
	
	while(cin >> a){
	
		cin >> b >> c >> d >> e >> f;
		
		del = a * e - b * d;
		x = (c * e - b * f) / del;
		y = (a * f - c * d) / del;
		
		func(x, -4);
		func(y, -4);
		cout << fixed;
	  cout.precision(3);
	  cout << x << " " << y << endl;
	}

	return 0;
}

void func(double x, int n){
	
	x *= pow(10, -n-1);
	round(x);
	x *= pow(10, n+1);	

}

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

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

	while(cin>>a>>b>>c>>d>>e>>f)
	{
		x=(e*c-b*f)/(a*e-b*d);
		y=(c*d-a*f)/(b*d-a*e);

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

//大文字を小文字に変換
/*
for(int i=0;i<inp.size();i++)
if(inp[i]>='A' && inp[i]<='Z')
inp[i]+='a'-'A';
*/

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

C++: #include<iostream>
#include<algorithm>
#include<cstdio>
//f = 108.233533
//puts sprintf( "%.3f", f )
using namespace std;
int main(){
	double a,b,c,d,e,f;
	//scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f);
	while(cin>>a>>b>>c>>d>>e>>f){
	double x,y;
	y=/*(double)*/ (c*d-a*f)/(b*d-a*e);
	x=/*(double)*/ (c-b*y)/a;
	printf("%.3f %.3f\n",x,y);
	}
	//printf("%.5f",f);
	return 0;
}

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

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

using namespace std;

int main(){
	cout << setprecision(3) << setiosflags(ios::fixed);
	double a, b, c, d, e, f;

	while(cin >> a >> b >> c >> d >> e >> f){
		cout << (c*e-f*b)/(a*e-d*b) + 0.000001<< " " << (c*d-f*a)/(b*d-a*e) + 0.000001 << '\n';
		}
	return 0;
}

C++: //include
//------------------------------------------
#include <bits/stdc++.h>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned long long ULL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

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

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

int fff(double x){
	if(x==(int)x){return 3;}
	else if(x*10==(int)(x*10)){return 2;}
	else if(x*100==(int)(x*100)){return 1;}
	else if(x*1000==(int)(x*1000)){return 0;}
}

int main(){
	double k[60000]={0};
	int i=0;
	while(cin>>k[i++]);
	int n=i-1;
	for(int j=0;j<n;j+=6){
		double x=0,y=0,a=k[j],b=k[j+1],c=k[j+2],d=k[j+3],e=k[j+4],f=k[j+5];
		x=(c*e-b*f)/(-b*d+a*e);
		y=(c*d-a*f)/(b*d-a*e);
		if(x==0)x=abs(x);
		if(y==0)y=abs(y);
		x*=1000,x=round(x),x/=1000;
		y*=1000,y=round(y),y/=1000;
		cout<<x;int fx=fff(x);
		if(fx==3){cout<<".000 ";}
		if(fx==2){cout<<"00 ";}
		if(fx==1){cout<<"0 ";}
		if(fx==0){cout<<" ";}
		cout<<y;int fy=fff(y);
		if(fy==3){cout<<".000";}
		if(fy==2){cout<<"00";}
		if(fy==1){cout<<"0";}
		cout<<endl;
		
	}
	return 0;
}

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

int main()
{
  double a,b,c,d,e,f;
  while (cin >> a >> b >> c >> d >> e >> f)
 {
      if(a>1000||a<-1000){
	    cout << "nomber error" <<endl;
	    return 0;
     }
      if(b>1000||b<-1000){
	    cout << "nomber error" <<endl;
	    return 0;
     }
      if(c>1000||c<-1000){
	    cout << "nomber error" <<endl;
	    return 0;
     }
      if(d>1000||d<-1000){
	    cout << "nomber error" <<endl;
	    return 0;
     }
      if(e>1000||e<-1000){
	    cout << "nomber error" <<endl;
	    return 0;
     }
      if(f>1000||f<-1000){
	    cout << "nomber error" <<endl;
	    return 0;
     }
    cout<<fixed<<setprecision(3)<<(c*e-b*f)/(a*e-b*d)<<" ";
    cout<<fixed<<setprecision(3)<<(c*d-a*f)/(b*d-a*e);
    cout<<endl;
 }

  return 0;
}