Go: package main

import (
  "fmt"
)

func main() {
  var a,b,c,d,e,f float64
  var x,y float64
  for _, err := fmt.Scan(&a, &b, &c, &d, &e, &f); err == nil;
   _, err = fmt.Scan(&a, &b, &c, &d, &e, &f) {
    y = (a*f-c*d)/(a*e-b*d)
    x = (c-b*y)/a
    fmt.Printf("%.3f %.3f\n", x,y)
  }
}

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

using namespace std;

int main(){
  double a,b,c,d,e,f;
  vector<double> al,bl,cl,dl,el,fl;
  double x,y,n,m;

  while(cin >> a >> b >> c >> d >> e >> f){
    al.push_back(a);
    bl.push_back(b);
    cl.push_back(c);
    dl.push_back(d);
    el.push_back(e);
    fl.push_back(f);
  }

  for(int i=0; i<al.size(); i++){
    n = bl[i]/el[i];
    m = al[i]/dl[i];
    x = (cl[i]-n*fl[i])/(al[i]-n*dl[i]); 
    y = (cl[i]-m*fl[i])/(bl[i]-m*el[i]);
    if(x == 0){
      x = 0;
    }else if(y == 0){
      y = 0;
    }
    cout << setprecision(3) << fixed << x << " " << y << endl;
  }

  return 0;
}

C++: #include <functional>
#include <algorithm>
#include <iostream>
#include <sstream>
#include <cstring>
#include <iomanip>
#include <fstream>
#include <climits>
#include <cctype>
#include <cstdio>
#include <string>
#include <vector>
#include <bitset>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <deque>
#include <list>
#include <map>
#include <set>
using namespace std;

/*** typedef ***/
typedef long long LL;
typedef unsigned int ui;
typedef unsigned long long ULL;
typedef pair < int , int > ii;
typedef pair < LL  , LL  > ll;
typedef vector <int>  vint;
typedef vector <bool> vbool;
typedef vector <long> vlong;

/*** define ***/
#define sz(x)			((int)x.size())
#define tin(x)			scanf("%d",&x)
#define all(x)			x.begin(),x.end()
#define Set(b,a)		memset(b,a,sizeof b)
#define print1(x)		printf("Case %d:",x++)
#define tin2(x,y)		scanf("%d%d",&x,&y)
#define tin3(x,y,z)		scanf("%d%d%d",&x,&y,&z)
#define loop(i,i0,in)	for(int i=i0 ; i<in ; i++)
#define rep(i,n)		for(int i=0 ; i<(n) ; i++)
#define _rep(i,n)		for(int i=n-1 ; i>=0 ; i--)
#define _loop(i,in,i0)	for(int i=in-1 ; i>=i0 ; i--)
#define Fore(it, x)		for(typeof (x.begin()) it = x.begin(); it != x.end (); it++)
     
int main()  
{  
#ifdef Online_Judge
	freopen("a.in","r",stdin);
#endif
	int a,b,c,d,e,f;
	while(cin >> a >> b >> c >> d >> e >> f)
	{
		int x=((c*e) - (b*f))/((a*e)-(b*d));/*x=fabs(x);*/
		int y=((a*f) - (c*d))/((a*e)-(b*d));/*y=fabs(y);*/
		printf("%d.000 %d.000\n",x,y);
	}
	return 0;
}

C++: #include<iostream>
#include<string>
#include<cmath>
#include<cstdio>
#include<vector>
#include<stack>
#include<queue>
#include<algorithm>
#include<complex>
using namespace std ;
typedef vector<int> vi ;
typedef vector<vi> vvi ;
typedef vector<string> vs ;
typedef pair<int, int> pii; 
typedef long long ll ;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()

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

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

using namespace std;

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

C++: #include <cstdio>
#define LOOP(index,times) for(int index=0;index<times;index++)
using namespace std;

int main(){

float l[6];

while(scanf("%f %f %f %f %f %f",&l[0],&l[1],&l[2],&l[3],&l[4],&l[5]) != EOF){

	printf("%.3lf %.3lf\n",(l[2]*l[4]-l[1]*l[5])/(l[0]*l[4]-l[1]*l[3]),(l[2]*l[3]-l[0]*l[5])/(l[1]*l[3]-l[0]*l[4]));		

}
return 0;		
}

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

int main() {
  int a, b, c, d, e, f;
  while(cin >> a >> b >> c >> d >> e >> f) {
    double y = (d*c-a*f)/(double)(d*b-a*e);
    double x = (f-e*y)/(double)d;
    char buff[100];
    sprintf(buff, "%.3f", x);
    if(!strcmp(buff, "-0.000")) x = 0;
    sprintf(buff, "%.3f", y);
    if(!strcmp(buff, "-0.000")) y = 0;
    printf("%.3f %.3f\n", x, y);
  }
  return 0;
}

C++: //
//  main.cpp
//  Sample
//
//  Created by h3037183 on 2017/07/31.
//  Copyright ?? 2017??´ ?°????. All rights reserved.
//

#include <iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
    double a,b,c,d,e,f,x,y;
    for(;;){
    cin>>a>>b>>c>>d>>e>>f;
    x=(c*e-b*f)/(a*e-b*d);
    y=(c*d-f*a)/(b*d-a*e);
        if(x==0)x=0;
        if(y==0)y=0;
    printf("%.3lf %.3lf",x,y);
    cout<<endl;
    }
    return 0;
}

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

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

	return 0;
}

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

using namespace std;

int main(void){
  double x,y;
  double a,b,c,d,e,f;
  
  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(x==-0)x=0;
    if(y==-0)y=0;

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

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

using namespace std;

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

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

    return 0;
}

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

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

}

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 ee = e / b, dd = d / a;
    double ax = a * ee, cx = c * ee;
    printf("%f ", (cx - f) / (ax - d));
    b *= dd, c *= dd;
    printf("%f\n", (c - f) / (b - e));
  }
  return 0;
}

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

int main()
{
  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);

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

  return 0;
}

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

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

double d_round(double frac, int digit) {
	double copy = frac * pow(10, digit - 1);
	copy = copy - (int)copy;
	return frac + (int)(copy + (copy > 0.5 ? 0.5 : 0));;
}

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