Go: package main

import (
	"fmt"
)

func main() {
	for {
		var a, b, c, d, e, f float64
		i, _ := fmt.Scan(&a, &b, &c, &d, &e, &f)
		if i == 0 {
			break
		}

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

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

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

bool check_right_triangle(int a, int b, int c)
{
    if(a * a == b * b + c * c || b * b == c * c + a * a || c * c == a * a + b * b)
        return true;
    else return false;
}

int main()
{
    const int max_num_of_data = 1000;
    const int min = 1;
    const int max = 1000;
    
    int num_of_data;
    //std::cout << "データ数の入力" << std::endl;
    std::cin >> num_of_data;
    if(num_of_data > max_num_of_data){
        std::cout << "データ数<=" << max_num_of_data << std::endl;
        return 1;
    }
    
    int a, b, c;
    std::vector<bool> right_triangle;
    right_triangle.reserve(num_of_data);
    
    //std::cout << num_of_data << "個の整数データa b cの入力" << std::endl;
    for(int i = 0; i < num_of_data; ++i){
        std::cin >> a >> b >> c;
        if(min <= a && a <= max && min <= b && b <= max && min <= c && c <= max)
            right_triangle.push_back(check_right_triangle(a, b, c));       
        else{
            --i;
            std::cout << "整数は" << min <<"以上" << max << "以下に設定" << std::endl;
        }
    }
    
    //std::cout << "直角三角形かどうかを出力" << std::endl;
    for(int i = 0; i < right_triangle.size(); ++i){
        if(right_triangle.at(i))
            std::cout << "Yes" << std::endl;
        else
            std::cout << "No" << std::endl;
    }

    return 0;
}

C++: #include <stdio.h>

int main(void){
	int a,b,c,d,e,f;
	float x,y;
	while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF){
		x=1.0*(c*e-b*f)/(a*e-d*b)+0.0;
		y=1.0*(d*c-a*f)/(d*b-a*e)+0.0;
		printf("%.3lf %.3lf\n",x,y);
	}
}

C++: #include<stdio.h>

int main(void){
  float a,b,c,d,e,f,x,y;
  while(scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f) != EOF){
    if(a*e == b*d){
      printf("This equiation has no real number solution");
      break;
    }
    x = (e * c + (-1)*b*f)/(a*e-b*d);
    y = ((-1)*d*c + a * f)/(a * e - b* d);
    printf("%.3f %.3f\n",x,y);
  }
  return 0;
}

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

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

C++: #include<iostream>

int main()
{
	int a, b, c, d, e, f;
	std::cin >> a >> b >> c >> d >> e >> f;
	int det = b * d - a * e;
	std::cout << ( b * f - c * e ) / det << std::endl;
	std::cout << ( c * d - a * f ) / det << std::endl;

 	return 0;
}

C++: #include <iostream>
#include <math.h>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#define REP(i,n) for(int i=0;i<n;i++)
typedef long long ll;

using namespace std;
int kaijo(int n){
	int ans = 1;
	if (n != 0){
		for (int i = 0; i < n; i++){
			ans *= (n - i);
		}
	}
	else{
		ans = 1;
	}
	return ans;
}

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

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

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

	scanf("%f%f%f%f%f%f",&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=x*-1;
	}

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

	return 0;
}

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

using namespace std;
int a,b,c,d,e,f;
int main(){
	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);
		printf("%.3f %.3f",x,y);
	}
  return 0;
}

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

int main() {
	double a, b, c, d, e, f, xx, yy;
	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);
		cout << fixed << setprecision(3) << x << " " << y << endl;
	}

	return 0;
}

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

// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0004

int gcm(int a, int b) {
	if (a < 0) a *= -1;
	if (b < 0) b *= -1;
	if (a < b) {
		int t = a;
		a = b; 
		b = t;
	}
	if (b == 0) return a;
	return gcm(b, a % b);
}

int lcm(int a, int b) {
	int g = gcm(a, b);
	return (a / g) * (b / g);
}

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

C++: #include<iostream>
#include<iomanip>
using namespace std;
int main(void) {
    double a, b, c, d, e, f;
    while(cin >> a >> b >> c >> d >> e >> f){
        double x = (f - (c*e/b)) / (d - ((a*e)/b));
        if(x == 0){
            x = 0;
        }
        double y = (c/b) - (a/b) * x;

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

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

int main(){
  int i = 0;
  while(1){
  i++;
  int a, b, c, d, e, f;
  scanf("%d ",&a);
  scanf("%d ",&b);
  scanf("%d ",&c);
  scanf("%d ",&d);
  scanf("%d ",&e);
  scanf("%d ",&f);
  
  double x, y;
  x = (double)(c*e-b*f) / (double)(a*e-b*d);
  y = (double)(a*f-c*d) / (double)(a*e-b*d);
  x = (double)round(x*10000.0) / 10000.0;
  y = (double)round(y*10000.0) / 10000.0;
  printf("%.3f %.3f\n", x, y);
  
  if(scanf("%d", &a)==EOF) break;
  else{
    int line = i * 6;
    fseek(STDIN, lineL, SEEK_SET);
  }
  }
  
  return 0;
}

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

using namespace std;

//?????¨?????\
double round_four(double value){
    //0??????
    if (value <= 0.00001 && value >= -0.00001){
        return 0;
    }
    //?????????
    value *= 1000;
    value += (value / fabs(value)) * 0.5;
    int nValue = static_cast<int>(value);
    value = static_cast<double>(nValue) / 1000;
    return value;
}

//????¬?????¨?????§£
array<double, 2> comp_linear_equation(int a, int b, int c, int d, int e, int f){
    array<double, 2> result;
    result[0] = static_cast<double>(e * c - (f * b));
    result[1] = static_cast<double>(-(d * c) + a * f);
    double num = 1.0 / ((a * e) - (b * d));
    result[0] *= num;
    result[1] *= num;
    result[0] = round_four(result[0]);
    result[1] = round_four(result[1]);
    return result;
}

//?????????
int main(){
    int a, b, c, d, e, f;
    vector<array<double, 2>> result;
    while (cin >> a >> b >> c >> d >> e >> f){
        result.push_back(comp_linear_equation(a, b, c, d, e, f));
    }
    for (const auto& element : result){
        for (auto num : element){
            cout << fixed << setprecision(3) << num << " ";
        }
        cout << endl;
    }
    return 0;
}

C++: #include<stdio.h>
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);
    }
}