Go: package main

import "fmt"

func main() {

	for {
		var a, b, c, d, e, f float64
		var x, y float64
		i, _ := fmt.Scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)
		if i != 6 {
			return
		}

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

		fmt.Printf("%.3f %.3f\n", x, y)
	}
}

C++: #include<cstdio>
int main(void)
{
	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)
	{
		y=(a*f-d*c)/(-(d*b)+a*e);
		x=(c-b*y)/a;
		if(x==0)
		{
			x=0;
		}
		if(y==0)
		{
			y=0;
		}
		printf("%.3lf %.3lf\n",x,y);
	}
	return 0;
}
/*
ax=c-by
->x=(c-by)/a
d((c-by)/a)+ey=f
(dc-dby)/a+ey=f
(dc-dby)+aey=af
-dby+aey=af-dc
y(-db+ae)=af-dc
->y=(af-dc)/(-db+ae)
*/

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){
        
        
        if(a!=0)
            y=((d/a)*c-f)/((d/a)*b-e);
        else
            y=c/b;
        
        if(b!=0)
            x=((e/b)*c-f)/((e/b)*a-d);
        else
            x=c/a;
        
        if(x==-0)x=0;
        if(x==-0)y=0;
        cout<<fixed<<setprecision(3)<<x<<" "<<y<<endl;
    }
}

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 = double(c*e-f*b)/double(a*e-d*b);
		double y = double(c*d-f*a)/double(b*d-a*e);
		cout << fixed << setprecision(3) << x << " " << y << endl;
	}
}

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

int main(){
    	int a, b, c, d, e, f;
	double x, y;
	while(1){
	if (!(cin>>a>>b>>c>>d>>e>>f))break;
		x=(double)(1.0/(a*e-b*d))*(e*c-b*f);
		y=(double)(1.0/(a*e-b*d))*(-d*c+a*f);
		cout << (double)x << " " << (double)y << endl;
	}
	return 0;
}

C++: #include <cstdio>

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

C++: 
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line ="";
		while((line = br.readLine())!=null){
			String[] s= line.split(" ");
			int a = Integer.parseInt(s[0]);
			int b = Integer.parseInt(s[1]);
			int c = Integer.parseInt(s[2]);
			int d = Integer.parseInt(s[3]);
			int e = Integer.parseInt(s[4]);
			int f = Integer.parseInt(s[5]);
			int x = (e*c - b*f)/(a*e - b*d);
			int y = (a*f - c*d)/(a*e - b*d);
			System.out.println(x+" "+y);
		}

	}

}

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

using namespace std;

double EPS = 1e-9;

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

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

int main( void )
{
	float a,b,c,d,e,f;
	while( scanf( "%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f ) )
	{
		if( feof( stdin ) ) break;
		float det = 1.0f / ( a*e - b*d );
		float x = det * ( e*c - b*f );
		float y = det * ( -c*d + a*f );
		if( fabs( x ) < 0.001f ) x = 0.0f;
		if( fabs( y ) < 0.001f ) y = 0.0f;
		printf( "%.3f %.3f\n", x, y );
	}
	return 0;
}

C++: #include <iostream>
#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 - b*f) / (a*e-b*d);
		y = (c*d - a*f) / (b*d - a*e);

		printf("%.3lf %.3lf\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(3)
            << (b*f - c*e)/(b*d - a*e) + 0.0
            << " "
            << (a*f - c*d)/(a*e - b*d) + 0.0 << endl;

    return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <iomanip>
//#include <vector>
//#include <string>
//#include <algorithm>
//#include <functional>

using namespace std;

int main(){

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

	while(cin >> a >> b >> c >> d >> e >> f){
		A = a*e - b*d;
		x = (e*c - b*f) / A;
		y = (a*f - d*c) / A;
		cout << fixed << setprecision(3);
		cout << x <<" "<< y << endl;
		//printf("%.3f %.3f\n", x , y );
	}



	return 0;
}

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

using namespace std;

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

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

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

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

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

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

	return 0;
}

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

int main(){
  double a,b,c,d,e,f,y,x;
  while(cin >> a>>b>>c>>d>>e>>f){
    
      y = (double)(d*c-a*f)/(d*b-a*e);
      x = (double)((e*c-b*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;

void OutputSolution(int a, int b, int c, int d, int e, int f)
{
    double x, y;
	if(b == 0){
		x = c / a;
		y = (f-d*x) / e;
	}else{
		int B = b;
		a *= e;
		b *= e;
		c *= e;
		d *= B;
		e *= B;
		f *= B;
		x = (c-f) / (a-d);
		y = (c-a*x) / b;
	}
	if(x == -0) x == 0;
	cout << fixed << setprecision(3) << x << ' ' << y << endl;
}

int main()
{
	while(true){
		int a, b, c, d, e, f;
		cin >> a >> b >> c >> d >> e >> f;
		if(cin.eof()) break;
		OutputSolution(a, b, c, d, e, f);
	}
	return 0;
}

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

C++: #include <iostream>
#include <cstdio>
using namespace std;
int main(void){
     
    double x, y;
    double a, b, p;
    double 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<stdio.h>

int main(void){
  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){
    if(a*e == b*d){
      printf("This equiation has no real number solution");
      break;
    }
    x =(double)(e * c + (-1)*b*f)/(double)(a*e-b*d);
    y = (double)((-1)*d*c + a * f)/(double)(a * e - b* d);
    printf("%f %f\n",x,y);
  }
}

C++: #include<stdio.h>

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