Go: package main

import (
  "fmt"
)

func main() {
  var a,b,c,d,e,f float64
  var x,y float64
  for _, err := fmt.Scan(&a, &b, &c, &d, &e, &f); err == nil;
   _, err = fmt.Scan(&a, &b, &c, &d, &e, &f) {
    y = (a*f-c*d)/(a*e-b*d)
    x = (c-b*y)/a
    fmt.Printf("%.3f %.3f\n", x,y)
  }
}

C++: #include <iostream>
#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*e-b*f)/(a*e-b*d);
    y=(c*d-a*f)/(b*d-e*a);
    cout<<fixed<<setprecision(3)<<x<<" "<<y<<endl;
  }
  return 0;
}

C++: #include<map>
#include<set>
#include<list>
#include<cmath>
#include<queue>
#include<stack>
#include<cstdio>
#include<string>
#include<vector>
#include<complex>
#include<cstdlib>
#include<cstring>
#include<climits>
#include<numeric>
#include<sstream>
#include<iostream>
#include<algorithm>
#include<functional>

using namespace std;

int main(){
	double a,b,c,d,e,f,x,y;
	while(cin >> a >> b >> c >> d >>e >> f){
		x = (c*e-f*b)/(a*e-d*b);
		y = (c-a*x)/b;
		printf("%.3lf %.3lf\n",x,y);
	}
}

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

int main(){

	float a, b, c, d, e, f;

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

		float det = a * e - b * d;

		float dx = c * e - b * f;
		float dy = a * f - c * d;

		float x = dx / det;
		float y = dy / det;

		cout << fixed << setprecision(4) << x << " " << y << endl;
	}

	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <set>
#include <map>
#include <list>
#include <iterator>
#include <queue>
#include <stack>
#include <deque>
#include <sstream>
#include <algorithm>
#include <numeric>
#include <string>
#include <cmath>
#include <complex>
#include <functional>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cassert>
#include <cstdlib>
#include <cctype>

#define REP(i,m,n) for(int i=m;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define rp(i,c) rep(i,(int)c.size())
#define fr(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define mp make_pair
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define rall(u) (u).rbegin(),(u).rend()
#define dbg(x) cerr<<#x<<" = "<<(x)<<endl
#define v_delete(a,b) (a).erase(remove((a).begin(), (a).end(), b), (a).end())
#define v_unique(a) (a).erase(unique((a).begin(), (a).end()), (a).end())
#define VV(T) vector<vector< T > >
#define init(a,b) memset((a), (b), sizeof((a)))
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
const int inf=1<<28;
const double INF=1e10,EPS=1e-9;


template<class T>int SIZE(T a){return a.size();}
template<class T>string IntToString(T num){string res;stringstream ss;ss<<num;return ss.str();}
template<class T>T StringToInt(string str){T res=0;for(int i=0;i<SIZE(str);i++)res=(res*10+str[i]-'0');return res;}
template<class T>T gcd(T a,T b){if(b==0)return a;return gcd(b,a%b);}
template<class T>T lcm(T a,T b){return a/gcd(a,b)*b;}

template <class T> void input(T& a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
template <class T> void input(T* a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
typedef pair<int,int> pii;

inline bool IN(int x, int y, int w, int h)
{
    return 0 <= x && x < w && 0 <= y && y < h;
}


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

	return 0;
}

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

int main(void)
{
	// ax+by=c,dx+ey=f => ax+by=c,-(a/d)*dx+-(a/d)*ey=-(a/d)*f => ax+by=c,-ax-aey/d=-af/d => by-aey/d=c-af/d => (b-ae/d)y = c-af/d => y=(c-af/d)/(b-ae/d)
	// ax+by=c, ax=c-by, x=(c-by)/a
	
	signed int a, b, c, d, e, f;
	double x, y;
	
	do
	{
		if(std::cin >> a, !std::cin) break;
		std::cin >> b >> c >> d >> e >> f;
		y = (c-a*f/d)/(double)(b-a*e/d);
		x = (c-b*y)/(double)a;
		printf("%.3lf %.3lf\n", x, y);
	} while(true);

	return 0;
}

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

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

int main(int argc, char const *argv[]) {
  double x, y;
  double a, b, c, d, e, f;
  while (!(cin >> a >> b >> c >> d >> e >> f).eof()) {
    x = (e * c - b * f) / (a * e - b * d);
    y = (a * f - c * d) / (a * e - b * d);
    std::cout << fixed << setprecision(3) << x << " " << y << '\n';
  }
  return 0;
}

C++: #include<cstdio>
#include<iostream>
using namespace std;
int main(){

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

  while(cin >> a){
    cin >> b >> c >> d >> e >> f;
    
    if((a*e-d*b) == 0) x = 0;
    else x = (c*e-f*b)/(a*e-d*b);
    if((b*d-e*a) == 0) y = 0;
    else y = (c*d-f*a)/(b*d-e*a);

    printf("%.3lf %.3lf\n",x,y);
  }
  return (0);
}

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

static int N = 2;
int pivot;


int main(){
    int i, j, k, n;
  
    // ?????§?????°?????? M
    double M[N][N + 1];
    for (int i = 0; i < N; ++i){
        for(int j= 0; j < N+1; ++j){
            cin >> M[i][j];
        }
    }
    
  

 
    double pivot, mul;
 
    // ????§??????????1??§??£????????????????????????????????????(???????¶????)
    for (i = 0; i < N; ++i){
        // ????§??????????????????????????????§??????????????£??????
        pivot = M[i][i];
        for (j = 0; j < N + 1; ++j){
           M[i][j] = (1 / pivot) * M[i][j];
        }
 
    // ???????????????????????????????????¨?????????????????????????????????
    // i??????????????????0???????????????????????¬?????¢?????????
         for (k = i + 1; k < N; ++k){
            mul = M[k][i];
            for (n = i; n < N + 1; ++n){
                M[k][n] = M[k][n] -  mul * M[i][n];
            }
        }
    }
 
    // ???????????????????????£????????°?????£??\???????????¬??????????§£?????¢?????????(????????£??\)
    // ????????¨??????????????????????????§?????¬??????????§£???????????????
    for (i = N - 1; i > 0; --i){
        for (k = i - 1; k >= 0; --k){
            mul = M[k][i];
            for (n = i; n < N + 1; ++n){    
                M[k][n] = M[k][n] - mul * M[i][n];
            }
        }
    }
    cout << fixed << setprecision(3) << M[0][2] << " " << M[1][2] << endl; 
}

C++: #include <iostream>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <algorithm>
#include <stdlib.h>

using namespace std;
double a, b, c, d, e, f;
double x, y;


void function(){
	if(c/b == f/e){
		x = 0;
		y = c/b;
	}else if(c/a == f/d){
		y = 0;
		x = c/a;
	}else{
		y = (c*d - a*f)/(d*b - a*e);
		x = (c - b*y)/a;
	}
	return;
}


int main(){
	int n;
	cin >> n;

	for(int i=0 ; i<n ; i++){
		double x1, y1, x2, y2, x3, y3;
		cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;

		a = 2*(x2 - x1);
		b = 2*(y2 - y1);
		c = (x2 - x1)*(x1 + x2) + (y2 - y1)*(y1 + y2);

		d = 2*(x3 - x1);
		e = 2*(y3 - y1);
		f = (x3 - x1)*(x3 + x1) + (y3 - y1)*(y1 + y3);

		function();
		double r;
		r = sqrt((x - x1)*(x - x1) + (y - y1)*(y - y1));

		printf("%.3lf %.3lf %.3lf\n",x, y, r);
	}
	return 0;
}