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<stdio.h>

void printFunc(int a,int b,int c,int d,int e,int f);

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

  while(fscanf(stdin,"%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) != 0){
    int pa = a,pb = b,pc = c,pd = d,pe = e,pf = f;   
    printFunc(a,b,c,d,e,f);
  }
  
  return 0;
}

void printFunc(int a,int b,int c,int d,int e,int f){
  float ansX,ansY;
  if(b == 0 || e == 0){
    ansY = 0;
  }
  else{
    ansY = (float)(c*d - f*a)/(float)(b*d - e*a);
  }

  if(a == 0 || d == 0){
    ansX = 0;
  }
  else{
    ansX = (float)(c*e - f*b)/(float)(a*e - d*b);
  }

  if(ansX < 0.0005f){
    ansX = 0.0f;
  }
  if(ansY < 0.0005f){
    ansY = 0.0f;
  }

  printf("%.3f %.3f\n",ansX,ansY);
}

C++: #include<stdio.h>
#include<math.h>
int main(void){
    double a,b,c,d,e,f,A,x,y,X,Y,Z;

    while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF){
    A=a;
    a=a*d,b=b*d,c=c*d;
    d=d*A,e=e*A,f=f*A;

    Y=b-e,Z=c-f;
    y=Z/Y;
    x=(c-y*b)/a;
    x=x+0.0005,y=y+0.0005;
    x=x*1000,y=y*1000;
    x=floor(x);
    y=floor(y);
    x=x/1000,y=y/1000;

   printf("%.3lf %.3lf\n",x,y);
    }
   // printf("\na%lf\nb%lf\nc%lf\nd%lf\ne%lf\nf%lf\n%lf\n%lf",a,b,c,d,e,f,Y,Z);


    }

C++: #include <stdio.h>
#pragma warning(disable : 4996)
long double a, b, c, d, e, f, x, y;
int main() {
	while (~scanf("%Lf%Lf%Lf%Lf%Lf%Lf", &a, &b, &c, &d, &e, &f)) {
		x = (c * e - b * f) / (a * e - b * d);
		y = (a * f - c * d) / (a * e - b * d);
		if (-0.0005 < x && x < 0.0005) x = 0.0;
		if (-0.0005 < y && y < 0.0005) y = 0.0;
		printf("%.3Lf %.3Lf\n", x, y);
	}
	return 0;
}

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

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

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

using namespace std;

static vector<double> solve_simultaneous(const vector<double> &set) {
	vector<double> result(2, 0);
	result.at(0) = ( (set.at(2) * set.at(4) - set.at(1) * set.at(5))
		/ (set.at(0) * set.at(4) - set.at(1) * set.at(3)) );
	result.at(1) = ( (set.at(2) * set.at(3) - set.at(0) * set.at(5))
		/ (set.at(1) * set.at(3) - set.at(0) * set.at(4)) );

	if (result.at(0) == 0) {
		result.at(0) = 0;
	}
	if (result.at(1) == 0) {
		result.at(1) = 0;
	}

	return result;
}

int main(void) {
	int dataset_counter = 0;
	double check_input = 0;
	vector<vector<double> > input;

	while (cin >> check_input) {
		input.push_back(vector<double>(6));
		input.at(dataset_counter).at(0) = check_input;
		for (int i = 1; i < 6; i ++) {
			double temp;
			cin >> input.at(dataset_counter).at(i);
		}

		dataset_counter ++;
	}

	for (vector<double> dataset : input) {
		vector<double> result(2, 0);
		result = solve_simultaneous(dataset);

		cout << fixed;
		cout << setprecision(3) << result.at(0) << " "
		<< setprecision(3) << result.at(1) << endl;
	}

	return 0;
}

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

	int main(){

		double a,b,c,d,e,f;
		while(cin>>a>>b>>c>>d>>e>>f)
		{
			double tx,ty;

			tx = (1.0*(c*e - b*f) / (e*a - b*d));
			ty = (1.0*(d*c - a*f) / (b*d - a*e));

			if(tx>=0){
			tx+=0.0004;
		}
		else{
			tx-=0.0004;
		}
		if(ty>=0){
		   ty+=0.0004;
		}
		else{
			ty-=0.0004;
		}

			cout<<setprecision(3) << setiosflags(ios::fixed)<< tx<<" "<<ty<<endl;
		}
	

		
		return 0;
	}

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

int main()
{
	double a, b, c, d, e, f;
	while (std::cin >> a >> b >> c >> d >> e >> f) {
		double const denominator = a * e - b * d;
		std::cout.setf(std::ios::fixed);
		std::cout.precision(3);
		std::cout << std::showpoint
				  << (c * e - b * f) / denominator << ' '
				  << (a * f - c * d) / denominator << std::endl;
	}
	return 0;
}

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

using namespace std;
float a,b,c,d,e,f;
float findoutx,findouty;
float x,y,yadd;
float Timers1,Timers2;
int main()
{
    while(cin >> a >> b >> c >> d >> e >> f)
    {
    Timers1 = a;
    Timers2 = d;
    a=a*Timers2;
    b=b*Timers2;
    c=c*Timers2;
    d=d*Timers1;
    e=e*Timers1;
    f=f*Timers1;

    findouty=b-e;
    yadd = c-f;
    findouty = yadd/findouty;
    b = b*findouty;
    findoutx=(c-b)/a;

    if(findoutx==0)findoutx=0;
    if(findouty==0)findouty=0;



    cout<<fixed<<setprecision(3)<<findoutx << " "<<findouty<<endl;
    }

return 0;
}

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

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	int s = 1000000;
	int n;
	cin >> n;
	while (n--) {
		if (int(s*1.05) % 1000 == 0) {
			s = int(s*1.05);
		}
		else {
			s = int(s*1.05) + (1000 - int(s*1.05) % 1000);
		}
	}
	printf("%d\n", s);
    return 0;
}

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

C++: #include <cstdio>
#include <stdlib.h>
#include <math.h>

float a,b,c,d,e,f;
double    round( double val, int precision )
{
    double    ret;
    char    buf[256] = {'\0'};
    char    *p;

    sprintf( buf, "%.*f", precision, val );
    ret = strtod( buf, &p );

    return ret;
}
int main (){
  scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f);
  double x,y;
  x=(f*b/e-c)/(d*b/e-a);
  y=(f*a/d-c)/(e*a/d-b);
 round(x,4);
 round(y,4);
modf(x*1000, &x);
modf(y*1000, &y);
  printf("%.3f %.3f\n",x/1000,y/1000);
}

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

int main() {
	double a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		printf("%.3f", (c*e - b*f) / (a*e - d*b));
		cout << ' ' ;
		printf("%.3f", (c*d - a*f) / (b*d - a*e));
	}
}

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*e-d*f)/(a*e-b*d),(a*f-d*c)/(a*e-b*d));
  }
}

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


int main()
{
	double x1, y1, a, x2, y2, b;
	for (int i = 0; i < 2; i++)
	{
		cin >> x1 >> y1 >> a >> x2 >> y2 >> b;


		double d1 = x2;
		double d2 = x1;
		double xx1 = d1 * x1;
		double xy1 = d1 * y1;
		double a1 = d1 * a;
		double xx2 = d2 * x2;
		double xy2 = d2 * y2;
		double b1 = d2 * b;
		double y = xy1 - xy2;
		double c = a1 - b1;
		y = c / y;


		d1 = y2;
		d2 = y1;
		xx1 = d1 * x1;
		xy1 = d1 * y1;
		a1 = d1 * a;
		xx2 = d2 * x2;
		xy2 = d2 * y2;
		b1 = d2 * b;
		double x = xx1 - xx2;
		c = a1 - b1;
		x = c / x;
		if (x == 0)
		{
			x = 0;
		}
		if (y == 0)
		{
			y = 0;
		}
		printf("%.3lf %.3lf\n", x, y);
	}
	return 0;
}

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