Go: package main

import (
        "fmt"
        "bufio"
        "os"
        "math"
)

func main() {
        var a, b, c, d, e, f float64
        sc := bufio.NewScanner(os.Stdin)
        for sc.Scan() {
                fmt.Sscanf(sc.Text(), "%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)

                det := a*e - b*d
                x := (e*c - b*f) / det
                y := (a*f - c*d) / det
                if x == 0.0 {
                        x = math.Abs(x)
                }
                if y == 0.0 {
                        y = math.Abs(y)
                }
                fmt.Printf("%.3f %.3f\n", x, y)
        }
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

int main()
{
//	cut here before submit 
//	freopen("testcase.se2", "r", stdin);
	string str = "";

	while (getline (cin, str )){
		// ax + by = c
		// dx + ey = f
		double a, b, c, d, e, f;
		stringstream ss(str);
		ss >> a >> b >> c >> d >> e >> f;
		// [ a b ][x] = [c]
		// [ d e ][y]   [f]
		// [x] = [e -b][c]
		// [y]   [-d a][f]/D
		double D = a*e - b*d;
		double y = (a*f - d*c)/D;
		double x = (c - b*y)/a;

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

	} // end for

	return 0;
}

C++: #include<stdio.h>

int a ;
int b ;
int c ;
int d ;
int e ;
int f ;
double x ;
double y ;

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

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

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

int main() {

  int a,b,c,d,e,f;

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

    double x = 1.00;
    if ( ( c*e - f*b ) * ( a*e - d*b ) != 0 ) {
      x = x * ( c*e - f*b ) / ( a*e - d*b );
    }else {
      x = 0.00;
    }
    double y = 1.00;
    if ( ( c*d - f*a ) * ( b*d - e*a ) != 0 ) {
      y = y * ( c*d - f*a ) / ( b*d - e*a );
    }else {
      y = 0.00;
    }

    cout << fixed << setprecision(3) << x << " " << y << endl;

  }

  return 0;

}

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

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

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

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

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

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

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

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

int main(){
	double  a, b, c, d, e, f, num[6];
	while(cin >> a >> b >> c >> d >> e >> f){
		num[0] = a;
		num[1] = b;
		num[2] = c;
		num[3] = d;
		num[4] = e;
		num[5] = f;
		b *= d;
		c *= d;
		e *= a;
		f *= a;
		b -= e;
		c -= f;
		c /= b;
		num[0] *= num[4];
		num[2] *= num[4];
		num[3] *= num[1];
		num[5] *= num[1];
		num[0] -= num[3];
		num[2] -= num[5];
		num[2] /= num[0];
		if(num[2] == -0)
			num[2] = 0;
		if(c == -0)
			c = 0;
		cout << fixed << setprecision(3) << num[2] << ' ' << c << endl;
	}
    return 0;
}

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


double a,b,c,d,e,f;
double A,B;//x,y座標
int main(){
  while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) !=EOF){
    B =(c*e-f*b)/(a*e-b*d);
    A = (c -b*B)/a;
    
    if(A ==0)
      A =0;
    if(B ==0)
      B =0;
    A =floor((A+0.0005)*1000)/1000;//小数第4位を四捨五入
    B =floor((B+0.0005)*1000)/1000;
    printf("%.3f %.3f\n",B,A);
  }
  return 0;
}

C++: #include <cstdio>

int main(){
	int a,b,c,d,e,f;
	double x,y;
	while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF){
		x = (double)(e*c-b*f)/(e*a-b*d);
		y = (double) (c-a*x)/b;
		if(0.00049>x&&x> -0.00049) x=0;
		if(0.00049>x&&x> -0.00049) y=0;
		printf("%.3f %.3f\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){
    cin >> b >> c >> d >> e >> f;
    
    if(c*e==f*b||a*e==d*b) printf("0.000 ");
    else printf("%.3f ",(c*e-f*b)/(a*e-d*b));
    if(c*d==f*a||b*d==e*a) printf("0.000\n");
    else printf("%.3f\n",(c*d-f*a)/(b*d-e*a));
  }

  return (0);
}

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

using namespace std;

int main(){

  float a, b, c, d, e, f;
  float temp;
  float x, y;

  cin >> a >> b >> c >> d >> e >> f;

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

  cout << fixed << setprecision(3) << x << " " << y << "\n";

  return 0;
}

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

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

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

using namespace std;

int main(){

double x, y, a, b, c, d, e, f;

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

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


cout << setiosflags(ios::fixed) << setprecision(3) << x << " " << y;
}
}

C++: #include<iostream>
#include<cmath>
using namespace std;
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<<" "<<y<<endl;
	}
	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <stdio.h>

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

C++: #include<stdio.h>
int a,b, c, d, e, f;

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

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

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

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