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,a_,b_,c_,d_,e_,f_;
double x,y;
double in;
while (std::cin >>a>>b>>c>>d>>e>>f){
in = (a*e - b*d);
a_ = a/in;
b_ = -1*d/in;
d = -1*b/in;
e_ = e/in;
x = c * a_ + f*b_;
y = c*d_ + f*e_;
std::cout << std::setprecision(3) << std::fixed << x << ' ' << std::setprecision(3) <<std::<<fixed <<  y << std::endl;
}
    return 0;
}

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

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

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

int main(){
  double a, b, c, d, e, f, x, y; //連立方程式の各係数

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

    if(x == -0){
      x = 0.0;
    }
    if(y == -0){
      y = 0.0;
    }

    printf("%.3f %.3f\n", x, y);
  }

  return 0;
}

C++: #include<iostream>
int GCM(int a,int b){
	if(b==0)return a;
	return GCM(b,a%b);
}

int main(){
	int a,b,c,d,e,f;
	std::cin>>a>>b>>c>>d>>e>>f;
	float x,y;
	int a_=a,b_=b,c_=c,d_=d,e_=e,f_=f;
	b_*=GCM(a,d)/a,c_*=GCM(a,d)/a;
	e_*=GCM(a,d)/d,f_*=GCM(a,d)/d;
	y=(c_-f_)/(b_-e_);
	x=(c-y*b)/a;
	std::cout<<x<<" "<<y<<std::endl;
	return 0;
}

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

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

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

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

C++: #include <iostream>
#include <stdio.h>
#include <vector>
using namespace std;
int main() {
 int cn=0;
 double a,b,c,d,e,f,i;
 vector<double> x,y;
 while(cin >> a >> b >> c >> d >> e >> f) {
	 y.push_back((c-f*a/d)/(b-e*a/d));
	 x.push_back((c-b*y[cn++])/a);
	 }
 for (i=0;i<cn;i++) printf("%.3f %.3f\n",x[i],y[i]); 
 return 0;
}

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

using namespace std;
 
#define N 2

int main(void)
{
	double a[N][N+1];
	int i, j, k;
	for( i=0; i<N; i++ ){
		for( j=0; j<N+1; j++ ){
			cin >> a[i][j];
		}
	}

	double p, d;
	for( k=0; k<N; k++ ){
		p = a[k][k];
		for( i=0; i<N+1; i++ )
			a[k][i] /= p;
		for( i=0; i<N; i++ ){
			if( i != k ){
				d = a[i][k];
				for( j=0; j<N+1; j++ ){
					a[i][j] -= a[k][j]*d;
				}
			}
		}
	}

	cout << setprecision(3) << setiosflags(ios::fixed);
	cout << a[0][N] << " " << a[1][N] << endl;

	return 0;
}

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

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

C++: #include<iostream>
#include<cstdio>
#include<iomanip>
#include<vector>
using namespace std;
class SimultaneousEquation{ 
    public:
        void solve(vector<int> abcdef){ 
            double x,y;
            for(x=-1000;x<=1000;x++){ 
                for(y=-1000;y<=1000;y++){ 
                    if(abcdef[0]*x+abcdef[1]*y==abcdef[2]&&abcdef[3]*x+abcdef[4]*y==abcdef[5])printf("%.3lf %.3lf\n",x,y);
                }
            }
        }
};
int main(){ 
    vector<int> abcdef(6);
    while(cin>>abcdef[0]>>abcdef[1]>>abcdef[2]>>abcdef[3]>>abcdef[4]>>abcdef[5]){
        SimultaneousEquation inst;
        inst.solve(abcdef);
    }
}

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


int main(void){

  int a;
  int b;
  int c;
  int d;
  int e;
  int f;

  float x;
  float y;

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

  x = a * e - b * d ;
  y = b * d - a * e ;

  if ((x == 0) && (y == 0)){
    cerr << "error" << endl;
    exit(1);
  }else if(x == 0){
    cerr << "error" << endl;
    exit(1);
  }else if(y == 0){
    cerr << "error" << endl;
    exit(1);
  }else{

    if(c * e - b * f == 0){
      x = 0;
    }else{
      x = ( c * e - b * f ) / x ;
    }

    if(c * d - a * f == 0){
      y = 0;
    }else{
      y = ( c * d - a * f) / y;
    }

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

  return 0;


}

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

int main()
{
	double x[2],y[2],z[2];
	double X,Y;

	while(cin >> x[0] >> y[0] >> z[0] >> x[1] >> y[1] >> z[1]){
		y[0] *= x[1];	z[0] *= x[1];
		y[1] *= x[0];	z[1] *= x[0];

	
		Y = (z[0]-z[1]) / (y[0]-y[1]);

		y[0] /= x[1];
		z[0] /= x[1];
		z[0] -= y[0] * Y;

		X = z[0]/x[0];

		cout.precision(3);
		cout.setf(ios::fixed);
		cout << X << " "<< Y << endl;

	}
	return 0;
}

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){
    y=(c*d-f*a)/(b*d-e*a);
    x=(c*e-f*b)/(a*e-d*b);
    cout<<fixed<<setprecision(3)<<x<<" "<<y<<endl;
    }
}

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

C++: #include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <utility>
using namespace std;
typedef pair<double, double> PDD;
PDD calc(double mat[2][2], double vec[2]){
  double a = mat[0][0], b = mat[0][1], d = mat[1][0], e = mat[1][1];
  double c = vec[0], f = vec[1];
  double det = a * e - d * b;
  return make_pair((e * c - b * f) / det, (-c * d + a * f) / det);
}
int main(){
  double mat[2][2];
  double vec[2];
  while(cin >> mat[0][0] >> mat[0][1] >> vec[0] >> mat[1][0] >> mat[1][1] >> vec[1]){
    PDD res = calc(mat, vec);
    double x = (double)(round(res.first*100))/100.0, y = (double)(round(res.second*100))/100.0;
    printf("%.3f %.3f\n", x, y);
  }
  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;



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


}

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

int main(){
	float a,b,c,d,e,f,x,y;
	
	scanf("%f%f%f%f%f%f",&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("%.3f%.3f",x,y);
	
	return 0;
	
	}

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){
y=(c*d-f*e)/(b*d-a*e);
x=(c-b*y)/a;
cout<<setprecision(3)<<x<<y<<endl;}
return 0;}

C++: #include <iostream>
#include <iomanip>
#include <stdio.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)
	{
		X=(C*E-F*B)/(A*E-D*B);
		Y=(A*F-D*C)/(A*E-D*B);

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

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

		printf("%.3f %.3f\n",X,Y);
	}
}