Go: package main

import "fmt"

func main() {
	var Xs, Ys []float32
	Xs = make([]float32, 0)
	Ys = make([]float32, 0)
	var cnt int
	for {
		var a, b, c, d, e, f, x, y float32
		fmt.Scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)
		if a == 0 {
			break
		}
		y = (((a * f) - (d * c)) / ((a * e) - (b * d)))
		x = ((c - (b * y)) / a)
		Xs = append(Xs, x)
		Ys = append(Ys, y)
		cnt++
	}
	for i := 0; i < cnt; i++ {
		fmt.Printf("%.3f %.3f\n", Xs[i], Ys[i])
	}
}

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

int main(){

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

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

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

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

	}

	return 0;

}

C++: #include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int a, b, c, d, e, f;
    while (cin >> a >> b >> c >> d >> e >> f) {
        double x = double(e * c - b * f) / (e * a - b * d);
        double y = double(c - a * x) / b;
        cout << fixed << setprecision(3) << x << " " << y << "\n";
    }
}

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

#define COL 3 //列
#define LINE 2 //行

//連立方程式1つとxyの答えを持つ
typedef struct{
	double data[LINE][COL];
	double x_answer;
	double y_answer;
} Question;


int main(){
	Question q[10];
	int q_num = 0;//問題数
	int i,j,k = 0;
	int d;

	//入力の最後まで処理
	while( cin >> d ){
		for(i=0; i<LINE; i++){
			for(j=0; j<COL; j++){
				scanf("%lf",&q[q_num].data[i][j]);
			}
		}
		
		q_num++;
	}

	//問題を解く処理
	for(i=0; i<q_num; i++){
		//前進消去
		//(2)' = (2)-(1)*a10/a00
		for(j=COL-1; j>=0; j--){
			q[i].data[1][j] -= q[i].data[0][j] * q[i].data[1][0] / q[i].data[0][0];
		}
		
		q[i].y_answer =  q[i].data[1][2] / q[i].data[1][1] ;

		q[i].x_answer =  (q[i].data[0][2] - q[i].data[0][1] * q[i].y_answer) / q[i].data[0][0] ;

	}

	for(k=0; k<q_num; k++){
		printf("%.3lf %.3lf\n",q[k].x_answer,q[k].y_answer);
	}


	return 0;
}

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

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define MOD 1000000007 //10^9+7
#define INF 1000000000 //10^9

pair<double, double>equ2(int a,int b,int c,int d,int e,int f);

pair<double, double>equ2(int a,int b,int c,int d,int e,int f){
    double det=1.0/(a*e-b*d);
    double x=(double)(c*e-b*f)*det;
    double y=(double)(a*f-c*d)*det;
    if (x==-0) x=0;if (y==-0) y=0;
    return pair<double, double>(x,y);
}



int main ()
{
    int a,b,c,d,e,f;
    while (cin>>a>>b>>c>>d>>e>>f) {
        pair<double,double> ans=equ2(a,b,c,d,e,f);
        
        printf("%.3f %.3f\n",ans.first,ans.second);
    }
    return 0;
}

C++: #include "iostream"
#include<stdio.h>
using namespace std;

int main()
{
	int a, b, c,d;
	while (1)
	{
		cin >> a >> b >> c;
		if (a == -1 && b == -1 && c == -1)break;
		d = a + b; if (a == -1 || b == -1 || d < 30) {
			cout << 'F' << endl;
		}
		else {
			if (d >= 80)cout << 'A' << endl;
			if (80 > d &&d>= 65)cout << 'B' << endl;
			if (65 > d&&d >= 50)cout << 'C' << endl;
			if (50 > d &&d >= 30 && c < 50)cout << 'D' << endl;
			if (50 > d &&d >= 30 && c >= 50) { cout << 'C' << endl; }

		}
	}
	return 0;
}

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

void OutputSolution(int a, int b, int c, int d, int e, int f)
{
	int B = b;
	a *= e;
	b *= e;
	c *= e;
	d *= B;
	e *= B;
	f *= B;
	double x = (c-f) / (a-d);
	double y = (c-a*x) / b;
	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 <string>
#include <cstring>
#include <fstream>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <list>
#include <set>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <bitset>
#include <functional>

using namespace std;

#define FOR(i,n) 		for(int(i)=0;(i)<(int)(n);(i)++)
#define FORN(i,a,b,c) 	for(int(i)=a;i<(int)(b);i+=(c))
#define RES(x,nilai)	memset(x,nilai,sizeof(x));
#define pb              push_back
#define mp              make_pair
#define INF				1000000000

typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;

inline string IS(int a){
    char x[100];
    sprintf(x,"%d",a); string s = x;
    return s;
}

inline int SI(string a){
    char x[100]; int res;
    strcpy(x,a.c_str()); sscanf(x,"%d",&res);
    return res;
}

//==============================================

bool cmp(int x,int y) {return x>y;}

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

int main() {
	//freopen("in.txt","r",stdin);
	//freopen("13.txt","w",stdout);
	ios_base::sync_with_stdio(false); cin.tie(NULL);
	
	
    while(cin>>a>>b>>c>>d>>e>>f) {
        y = (a*f-c*d)/(a*e-d*b);
        x = (c-b*y)/a;
		cout << fixed << setprecision(3) << x << ' ' << y << endl;
    }
	
    return 0;
}

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

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

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

int main()
{
	double A, B, C, D, E, F, X, Y, G , H;

	while(cin >> A >> B >> C >> D >> E >> F)
	{
		G = A / D;
		D *= G;
		E *= G;
		F *= G;
		Y = (F-C) / (E-B);
		
		D /= G;
		E /= G;
		F /= G;
		H = B / E;
		D *= H;
		E *= H;
		F *= H;
		X = (F-C) / (D-A);

		X= floor(X*1000+0.5)/1000;
		Y= floor(Y*1000+0.5)/1000;

		if(Y==0){
			Y=0.000;
		}

		if(X==0){
			X=0.000;
		}

		cout<<fixed<<setprecision(3)<<X<<" "<<Y<<endl;
	}

	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int b,a,e,d,f,i,c;
	float y,x;
	while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF)  {
			y=(c*d-a*f)/(b*d-a*e);
			x=(b*f-c*e)/(b*d-a*e);
		if(x<0.0001 && x>-0.0001){
			x=0;
		}
		if(y<0.0&&y>-0.0001){
			y=0;
		}	
		printf("%.3f %.3f\n",x,y);
	}
	return 0;
}

C++: #include<iostream>
#include<string>
#include<iomanip>
using namespace std;
int main(){
	double a,b,c,d,e,f,x,y;
	while(cin>>a>>b>>c>>d>>e>>f){
		x=(c-b*f/e)/(a-b*d/e);
		y=(c-a*f/d)/(b-a*e/d);
		if(x>=0){
			int q=x*1000+0.5;
			x=q;
			x/=1000;
		}
		if(x<0){
			int q=x*1000-0.5;
			x=q;
			x/=1000;
		}
		if(y>=0){
			int q=y*1000+0.5;
			y=q;
			y/=1000;
		}
		if(y<0){
			int q=y*1000-0.5;
			y=q;
			y/=1000;
		}
		cout<<fixed<<setprecision(3)<<x<<" ";
		cout<<fixed<<setprecision(3)<<y<<endl;
	}
	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;
using ll = long long;
using pii = pair<int, int>;

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(3);
  
  auto det = [&](double a, double b, double c, double d) { return a * d - b * c; };
  double a, b, c, d, e, f;
  while (cin >> a >> b >> c >> d >> e >> f) {
    double x = det(c, b, f, e) / det(a, b, d, e);
    double y = det(a, c, d, f) / det(a, b, d, e);
    if (fabs(x) < 1e-10) x = 0;
    if (fabs(y) < 1e-10) y = 0;
    cout << x << " " << y << endl;
  }

  return 0;
}