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("%04f %04f\n", x, y)
        }
}

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

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

int main(){
int a,b,c,d,e,f,Ax,Ay;
float 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);
Ax=x*100000;
Ay=y*100000;
Ax+=5;
Ay+=5;
Ax/=10;
Ay/=10;
cout<<x<<" "<<y<<endl;}
}

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

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

C++: #include<stdio.h>
int main(void){
    double a,b,c,d,e,f,x,y,box1,box2,box3,box4;
    while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){
    box1=c*d;
    box2=a*f;
    box1=box1-box2;
    box3=b*d;
    box4=a*e;
    box2=box3-box4;
    y=box1/box2;
    box3=b*y;
    box4=c-box3;
    x=box4/a;
    x=x*10000+4;
    x=x/10000;
    y=y*10000+4;
    y=y/10000;
    }
return 0;
}

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

using namespace std;

int main() {

	double a, b, c, d, e, f,aa,bb;


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

			aa=(c*e-b*f)/(a*e-b*d);
	bb=(a*f-c*d)/(a*e-b*d);

	//cout << fixed << setprecision(3) << ((c*e-b*f)/(a*e-b*d))  << " " << ((a*f-c*d)/(a*e-b*d)) << endl;


		printf("%.3f %.3f\n",aa,bb);
	
	}

	return 0;
}

C++: #include<stdio.h>
#include<iostream>
int main() {
  double a,b,c,d,e,f;
  while(std::cin>>a>>b>>c>>d>>e>>f) {
    printf("%.3f %.3f\n",((c-(b*((a*f-c*d)/(a*e-b*d))))/a),(a*f-d*c)/(a*e-b*d));
  }
}

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

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

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

	return 0;
}

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

int main()
{ 
	double x1, x2, y1, y2, z1, z2;
	double x, y;
	while (cin >> x1 >> y1 >> z1 >> x2 >> y2 >> z2) {
		x = x1;
		x1 *= x2; y1 *= x2; z1 *= x2;
		x2 *= x; y2 *= x; z2 *= x;
		y = (z1 - z2) / (y1 - y2);
		if (z1 - z2 == 0)y = 0;
		x = (z1 - (y1*y)) / x1;
		if (z1 - (y1*y) == 0)x = 0;
		int a, b;
		a = x * 10000;
		b = y * 10000;
		if (a % 10 > 4) {
			a += 10;
			x = double(a) / 10000;
		}
		if (b % 10 > 4) {
			b += 100;
			y = double(b) / 10000;
		}
		cout << fixed;
		cout << setprecision(3) << x << ' ' << y << endl;

	}
	return 0;
}

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

int main()
{
	std::vector<int> x, y;
	int a, b, c, d, p, q;
	while (scanf("%d %d %d %d %d %d", &a, &b, &p, &c, &d, &q) != EOF)
	{
		x.push_back((d*p - b*q) / (a*d - b*c));
		y.push_back((a*q - c*p) / (a*d - b*c));
	}

	for (int i = 0; i < x.size(); ++i)
		std::cout << x[i] << " " << y[i] << std::endl;
	return 0;
}

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

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

int main()
{
    using namespace std;
    double a, b, c, d, e, f, x, y;
    cout.precision(3);
    cout << fixed << showpoint;
    while (cin >> a >> b >> c >> d >> e >> f) {
        double coef1 = d/a;
        b *= coef1; c *= coef1;
        y = (c - f)/(b - e);
        x = (c - b*y)/a;
        x = round(x*1000)/1000; y = round(y*1000)/1000;
        cout << x << " " << y << endl;
    }
}

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

using namespace std;

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


double x(double, double, double, double, double, double) {

	return (c*e - b*f) / (a*e - b*d);
}

double y(double, double, double, double, double, double) {

	return (a*f - c*d) / (a*e - b*d);
}

double round(double dat, int keta ){

	int fct;
	fct = (int)pow(10, keta - 1);
	dat *= fct;
	dat += (dat < 0) ? -0.5 : 0.5;
	dat = (int)(dat);
	dat /= fct;
	return dat;
}

int main()
{
	double x1, x2, y1, y2;
	cin >> a >> b >> c >> d >> e >> f;

	x1 = x(a, b, c, d, e, f);
	y1 = y(a, b, c, d, e, f);

	cin >> a >> b >> c >> d >> e >> f;

	x2 = x(a, b, c, d, e, f);
	y2 = y(a, b, c, d, e, f);

	cout << fixed << setprecision(3) << round(x1,3) << " " << round(y1,3) << endl;
	cout << fixed << setprecision(3) << round(x2,3) << " " << round(y2,3) << endl;

	return 0;
}

C++: const int tt = 10000;

#include<iostream>
#include<string>
#include<sstream>
using namespace std;

string toStr(int n);
string intToString(int n);

int main() {
  int a, b, c, d, e, f;
  
  while(cin >> a >> b >> c >> d >> e >> f) {
    c = c * tt;
    f = f * tt;

    int det = a * e - b * d;

    int x = ( e * c - b * f) / det;
    int y = (-d * c + a * f) / det;
//    cout << x << y << endl;

    cout << toStr(x) << " " << toStr(y) << endl;
  }
}

string toStr(int n) {
  string pm, val;
  
  if (n < 0) {
    pm = "-";
    n = -n;
  } else {
    pm = "";
  }

  int ipart = n / tt;
  int fpart = (n - ipart * tt) + tt + 5;

  val = pm + intToString(ipart) + "." + intToString(fpart).substr(1, 3);
  return val;
}

string intToString(int n) {
  stringstream ss;
  ss << n;
  return ss.str();
}

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


int main(void) {
    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);
        
        printf("%.3lf %.3lf", x, y);
        cout << endl;
    }
}

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

int main(){
	double a,b,c,d,e,f,g;
	while(cin >> a >> b >> c >> d >> e >> f){
		g = (c*e-b*f)/(e*a-b*d);
		if(g < 0) g *= -1;
		printf("%.6f %.6f\n",(c*e-b*f)/(e*a-b*d),(c - g));
	}
	return 0;
}

C++: #include<iostream>

double a, b, c, d, e, f;
bool flag;

int main()
{
	while(std::cin>>a>>b>>c>>d>>e>>f)
	{
		double x = (e*c-b*f)/(a*e-b*d);
		double y = (-d*c+a*f)/(a*e-b*d);
		printf("%8.3lf %8.3lf\n",x,y);
	}
	return 0;
}

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

int main()
{
    double a, b, c;
    double d, e, f;

    while (std::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);
        if (x == -0) {
            x = 0;
        }
        if (y == -0) {
            y = 0;
        }
        std::cout << std::fixed << std::setprecision(3)
                  << x << " " << y << std::endl;
    }

    return 0;
}