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

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

#define MAX 256

int main(void){

	float a, b, c, d, e, f;
	float ansx[MAX], ansy[MAX];

	int i = 0;

	while (scanf("%f%f%f%f%f%f%f", &a,&b,&c,&d,&e,&f) != EOF){
		if (a*e != b*d){
			ansx[i] = (c*e - b*f) / (a*e - b*d);
			ansy[i] = (c*d - a*f) / (b*d - a*e);
			if ((int)(ansx[i] * 10000) % 10 > 4){
				ansx[i] += 0.001;
			}
		}
		i++;
	}

	for (int j = 0; j < i; j++){
		printf("%.3f %.3f\n", ansx[j], ansy[j]);
	}
	
	return 0;
}

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

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

using namespace std;

int main(){
	cout << setprecision(3) << setiosflags(ios::fixed);
	double a, b, c, d, e, f;

	while(cin >> a >> b >> c >> d >> e >> f){
		cout << (c*e-f*b)/(a*e-d*b) + 0.000001<< " " << (c*d-f*a)/(b*d-a*e) + 0.000001 << '\n';
		}
	return 0;
}

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

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