Go: package main

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

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
                fmt.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;
}

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

int main()
{
	std::vector<int> x, y;
	int a, b, c, d, p, q;
	while (scanf_s("%d %d %d %d %d %d", &a, &b, &p, &c, &d, &q) != EOF)
	{
		x.push_back(d*p - b*q / (a*d - b*c));
		y.push_back(p*c - a*q / (b*c - a*d));
	}

	for (int i = 0; i < x.size(); ++i)
		std::cout << x[i] << " " << y[i] << std::endl;
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <string>
#include <set>
#include <queue>
#include <stack>
#include <cmath>
#include <functional>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long > vll;
typedef vector< vi > vvi;
int main() {
	float a,b,c,d,e,f,x,y;
	while(true){
		cin>>a>>b>>c>>d>>e>>f;
		if (cin.eof())break;
		x=c*e-b*f;
		y=a*f-c*d;
		if(x!=0){
		x/=a*e-d*b;
	}
		if(y!=0){
		y/=a*e-d*b;
	}
		printf("%.3f %.3f\n",x,y);
	}
}

C++: #include<iostream>

int main(){
    int a[5],i,j,n;
    
    for(i=0;i<5;i++){
        std::cin>>a[i];
         }
    for(i=0;i<4;i++){
        for(j=i+1;j<5;j++){
            if(a[i]<a[j]){
            n=a[i];
            a[i]=a[j];
            a[j]=n;
            	     }
                 }
            }
            
    for(i=0;i<5;i++){
    std::cout<<a[i]<<" ";
    }
                 
return 0;
}

C++: #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
#define loop(i,x,n) for(int i=(x);i<(n);i++)
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define mp make_pair
#define fir first
#define sec second
#define ub upper_bound
#define lb lower_bound
#define int long long
using namespace std;
const int MOD=1000000007;
const int INF=1000000009;

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

C++: #include <iostream>
#include <cstdio>
using namespace std;
int main()
{
  double a,b,c,d,e,f,x,y;
  while(cin >> a){
    cin >> b >> c >> d >> e >> f;
    if(b == 0){
      x = c / a;
    }else if(e == 0){
      x = f / d;
    }else if(b != 0 && e != 0){
      double g = a / b;
      double h = d / e;
      double i = c / b;
      double j = f / e;
      x = (i - j) / (g - h);
    }else{
      return -1;
    }
    if(b != 0){
      y = (c - a * x) / b;
    }else{
      y = (f - d * x) / e;
    }
    x = (int)(x * 1000) / (double)(1000);
    y = (int)(y * 1000) / (double)(1000);
    printf("%.3f %.3f\n", x, y);
  }
  return 0;
}

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

int main(int argc, char** argv) {
	const double EPS = 1.0e-10;
	double a, b, c, d, e, f; // -1000 <= a, b, c, d, e, f <= 1000
	while (cin >> a >> b >> c >> d >> e >> f) {
		double x = (c*e - b*f) / (a*e - b*d);
		double y = (a*f - c*d) / (a*e - b*d);
		if (-0.0005 < x && x < 0.0 + EPS) x = 0.0;
		if (-0.0005 < y && y < 0.0 + EPS) y = 0.0;
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}

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

C++: #include <iostream>
#include <cstdio>
#include <cmath>
using namespace std; 
int main()
{
double a,b,c,d,e,f;
while(cin>>a>>b>>c>>d>>e>>f)
{
printf("%.3f %.3f\n", round((1.0 * b*f - c*e)/(b*d - a*e) * 1000.0) / 1000.0, round((1.0 * a*f - c*d)/(a*e - b*d) * 1000.0) / 1000.0);
}
return 0;
}

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

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

C++: // 2011/05/30 Tazoe

#include <iostream>
using namespace std;

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

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

		cout.precision(3);
		cout << fixed << x;
		cout << ' ';
		cout.precision(3);
		cout << fixed << y;
		cout << endl;
	}

	return 0;
}

C++: #include <stdio.h>
#include <math.h>
int main(){
 double a,b,c,d,e,f,y,x;
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*e)-(b*f))/((a*e)-(b*d));
printf("%.3lf %.3lf\n", x,y);
}
return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<sstream>
#include<iomanip>
#include<cstdlib>
using namespace std;

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

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

int main(int argc, const char * argv[])
{
    double a, b, c, d, e, f, x, y;
    //cin >> a >> b >> c >> d >> e >> f
//    while (scanf("%lf %lf %lf %lf %lf %lf ", &a, &b, &c, &d, &e, &f) != EOF) {
    
    while (std::cin >> a >> b >> c >> d >> e >> f) {
        x = y = 0;
        x = (b*f - c*e) / (b*d - a*e);
        if (b*f == c*e) {
            x = 0;
        }
        y = ((a*b*f - a*c*e) / (a*b*e- b*b*d) + c / b);
        printf("%.3f %.3f\n", x, y);
    }
    
    return 0;
}

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

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

int main(int, char**)
{
	double a, b, c, d, e, f = 0;
	while (std::cin >> a >> b >> c >> d >> e >> f)
	{
		double y = (c * (a - d) - a * (c - f)) / (b * (a - d) - a * (b - e));
		printf_s("%.3f %.3f\n", ((c - f) - (b - e) * y) / (a - d), y);
	}
}

C++: #include <bits/stdc++.h>
#include <iostream>
#include <cstdio>
#include <math.h>
#include<algorithm>
#include <utility>
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) / (-a*e + b*d);
		if (x == -0.000) {
			x = abs(x);
		}
		if (y == -0.000) {
			y = abs(y);
		}
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}