Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)
	for {
		data := nextInts(6)
		if data[0] == 0 || data[1] == 0 || data[2] == 0 || data[3] == 0 || data[4] == 0 || data[5] == 0 {
			break
		}
		fmt.Printf("%.3f\n", Round(GetX(data[0], data[1], data[2], data[3], data[4], data[5]), 3))
		fmt.Printf("%.3f\n", Round(GetY(data[0], data[1], data[2], data[3], data[4], data[5]), 3))
	}
}

func GetX(a, b, c, d, e, f float64) float64 {
	return ((c * e) - (b * f)) / ((a * e) - (b * d))
}

func GetY(a, b, c, d, e, f float64) float64 {
	return ((c * d) - (a * f)) / ((b * d) - (a * e))
}

func Round(f float64, places int) float64 {
	shift := math.Pow(10, float64(places))
	return math.Floor(f*shift+.5) / shift
}

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() float64 {
	a, _ := strconv.Atoi(next())
	return float64(a)
}

func nextInts(n int) []float64 {
	a := make([]float64, n)
	for i := 0; i < n; i++ {
		a[i] = nextInt()
	}
	return a
}

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