criyle/codenet-compile-errors huggingface dataset:
Language: C

int main(void){
	double a,b,c,d,e,f,x,y;
	while((scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)) != EOF){
		y=(c*d-a*f)/(b*d-a*e)+0.00001;
		x=(c-b*y)/a+0.00001;
		printf("%.3lf %.3lf\n",x,y);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:16: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 |         while((scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)) != EOF){
      |                ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:3:16: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 |         while((scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)) != EOF){
      |                ^~~~~
main.c:3:16: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:3:71: error: 'EOF' undeclared (first use in this function)
    3 |         while((scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)) != EOF){
      |                                                                       ^~~
main.c:3:71: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:3:71: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    6 |                 printf("%.3lf %.3lf\n",x,y);
      |                 ^~~~~~
main.c:6:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:6:17: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <stdio.h>

int func(double a ,double b,double c,double d,double e,double f){
	int y;
	y=(c*d-a*f)/(b*d-a*e)+0.00001
	return y;
}

int main(void){
	double a,b,c,d,e,f,x,y;
	while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) != EOF){
		y=func(a,b,c,d,e,f);
		x=(c-b*y)/a+0.00001;
		printf("%.3lf %.3lf\n",x,y);
	}
	return 0;
}

Compiler output:
main.c: In function 'func':
main.c:5:38: error: expected ';' before 'return'
    5 |         y=(c*d-a*f)/(b*d-a*e)+0.00001
      |                                      ^
      |                                      ;
    6 |         return y;
      |         ~~~~~~
Language: C

#include <stdio.h>

void func(double a ,double b,double c,double d,double e,double f,double* x,double* y){
	*y=(c*d-a*f)/(b*d-a*e)+0.00001;
	*x=(c-b*(*y))/a+0.00001;
}

int main(void){
	double a,b,c,d,e,f;
	double* x,y;
	while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) != EOF){
		//y=func(a,b,c,d,e,f);
		//x=(c-b*y)/a+0.00001;
		printf("%.3lf %.3lf\n",*x,*y);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:43: error: invalid type argument of unary '*' (have 'double')
   14 |                 printf("%.3lf %.3lf\n",*x,*y);
      |                                           ^~
Language: C

#include <stdio.h>

double func(double a ,double b,double c,double d,double e,double f){
	return (c*d-a*f)/(b*d-a*e);
}

int main(void){
	double a,b,c,d,e,f,x,y;
	while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) != EOF){
		y=func(a,b,c,d,e,f);
		x=(c-b*y)/a;
		//func(a,b,c,d,e,f,x,y);
		printf("%.3lf %.3lf\n",*x,*y);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:40: error: invalid type argument of unary '*' (have 'double')
   13 |                 printf("%.3lf %.3lf\n",*x,*y);
      |                                        ^~
main.c:13:43: error: invalid type argument of unary '*' (have 'double')
   13 |                 printf("%.3lf %.3lf\n",*x,*y);
      |                                           ^~
Language: C

#include <stdio.h>

int main(int argc, const char * argv[])
{
    double a, b, c, d, e, f;
    double x, y;
    while (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != -1) {
        if (-1000 > a || a < 1000 || -1000 > b || b < 1000 || -1000 > c || c < 1000 || -1000 > d || d < 1000 || -1000 > e || e < 1000 || ||-1000 > f || f < 1000) {
            exit(0);
        }

        x = (c*e-b*f)/(a*e-b*d);
        y = (c*d-a*f)/(b*d-a*e);

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

Compiler output:
main.c: In function 'main':
main.c:8:138: error: expected expression before '||' token
    8 |         if (-1000 > a || a < 1000 || -1000 > b || b < 1000 || -1000 > c || c < 1000 || -1000 > d || d < 1000 || -1000 > e || e < 1000 || ||-1000 > f || f < 1000) {
      |                                                                                                                                          ^~
main.c:9:13: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
    9 |             exit(0);
      |             ^~~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
    1 | #include <stdio.h>
  +++ |+#include <stdlib.h>
    2 | 
main.c:9:13: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
    9 |             exit(0);
      |             ^~~~
main.c:9:13: note: include '<stdlib.h>' or provide a declaration of 'exit'
Language: C++

#include<iostream>
#include<cmath>
#include<string>

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


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:11:17: error: 'printf_s' was not declared in this scope; did you mean 'printf'?
   11 |                 printf_s("%.3f %.3f\n", ((c - f) - (b - e) * y) / (a - d), y);
      |                 ^~~~~~~~
      |                 printf
Language: C++

#include<iostream>

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


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:8:33: error: 'roundl' is not a member of 'std'
    8 |                 double y = std::roundl((c * (a - d) - a * (c - f)) / (b * (a - d) - a * (b - e)) * 1000.0) / 1000.0;
      |                                 ^~~~~~
a.cc:9:33: error: 'roundl' is not a member of 'std'
    9 |                 double x = std::roundl(((c - f) - (b - e) * y) / (a - d) * 1000.0) / 1000.0;
      |                                 ^~~~~~
Language: C++

#include<cmath
#include<iostream>

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


Compiler output:
a.cc:1:15: error: missing terminating > character
    1 | #include<cmath
      |               ^
Language: C++

#include<iostream>
#include<iomanip>
using namespace std;

int main()
{
	double x, y;
	double a, b, c, d, e, f;
        int J = 1;

	while (J){

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

                if ( J == 0)
                         break;

		y = ((d * c) - (a * f)) / ((b * d) - (e * a));
		x = (c - b * y) / a;

		x *= 10000;
		x = x + 0.5 - (x < 0);
		x = (int)x;
		x /= 10000;

		y *= 10000;
		y = y + 0.5 - (y < 0);
		y = (int)y;
		y /= 10000;


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

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:50: error: cannot convert 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int' in assignment
   13 |                 J = cin >> a >> b >> c >> d >> e >> f;
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
      |                                                  |
      |                                                  std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
Language: C++

#include<iostream>
#include<iomanip>
using namespace std;

int main()
{
	double x, y;
	double a, b, c, d, e, f;
	int J = 1;

	while (J){

		J = (int)(cin >> a >> b >> c >> d >> e >> f);

		if (J == 0)
			break;

		y = ((d * c) - (a * f)) / ((b * d) - (e * a));
		x = (c - b * y) / a;

		x *= 10000;
		x = x + 0.5 - (x < 0);
		x = (int)x;
		x /= 10000;

		y *= 10000;
		y = y + 0.5 - (y < 0);
		y = (int)y;
		y /= 10000;


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

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: invalid cast from type 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to type 'int'
   13 |                 J = (int)(cin >> a >> b >> c >> d >> e >> f);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <iomanip>
#include <cstdio>
using namespace std;
 
int main()
{
    int a, b, c, d, e, f;
    cout << showpoint << setprecision(3);
    while (cin >> a >> b >> c >> d >> e >> f){
        double x = ((double)(b*f - c*e)) / (double)(b*d - a*e);
        double y = ((double)(c*d - a*f)) / (double)(b*d - a*e);
        printf(".3f .3f", &x, &y)
    }
    cout.flush();
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:34: error: expected ';' before '}' token
   13 |         printf(".3f .3f", &x, &y)
      |                                  ^
      |                                  ;
   14 |     }
      |     ~
Language: C++

#include <iostream>
#include <cstdio>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:30: error: 'setprecision' was not declared in this scope
    8 |         cout << showpoint << setprecision(3);
      |                              ^~~~~~~~~~~~
a.cc:3:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
    2 | #include <cstdio>
  +++ |+#include <iomanip>
    3 | using namespace std;
Language: C++

#include<cstdio>
int main(void)
{
	int a,b,c,d,e,f;
	double x,y;
	while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f))!=EOF)
	{
		y=(a*f-d*c)/(-(d*b)+a*e);
		x=(c-b*y)/a;
		printf("%.3lf %.3lf\n",x,y);
	}
	return 0;
}
/*
ax=c-by
->x=(c-by)/a
d((c-by)/a)+ey=f
(dc-dby)/a+ey=f
(dc-dby)+aey=af
-dby+aey=af-dc
y(-db+ae)=af-dc
->y=(af-dc)/(-db+ae)
*/

Compiler output:
a.cc: In function 'int main()':
a.cc:6:60: error: expected primary-expression before '!=' token
    6 |         while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f))!=EOF)
      |                                                            ^~
Language: C++

#include <iostream>
#include <cstdio>
#ifndef repeat
#define repeat(i,n) for (int i = 0; i < (n); ++i)
#endif
#ifndef repeat_from
#define repeat_from(i,m,n) for (int i = (m); i < (n); ++i)
#endif
#ifndef repeat_one
#define repeat_one(i,n) for (int i = 1; i <= (n); ++i)
#endif
#ifndef repeat_rev
#define repeat_rev(i,n) for (int i = (n)-1; 0 <= i; --i)
#endif
#ifndef foreach
#define foreach(it, cont) for (typeof(cont.begin()) it = cont.begin(); it != cont.end(); ++it)
#endif
#include <vector>
#include <cmath>
#ifndef repeat
#define repeat(i,n) for (int i = 0; i < (n); ++i)
#endif
#ifndef repeat_from
#define repeat_from(i,m,n) for (int i = (m); i < (n); ++i)
#endif
#ifndef repeat_one
#define repeat_one(i,n) for (int i = 1; i <= (n); ++i)
#endif
#ifndef repeat_rev
#define repeat_rev(i,n) for (int i = (n)-1; 0 <= i; --i)
#endif
#ifndef foreach
#define foreach(it, cont) for (typeof(cont.begin()) it = cont.begin(); it != cont.end(); ++it)
#endif
#ifndef LIB_DEBUG_HPP
#define LIB_DEBUG_HPP
#ifdef DEBUG
#include <cassert>
#define debug(a) a
#else
#define debug(a)
#endif
#endif
#include <iostream>

// a11x1 + a12x2 + ... + a1m-1xm-1 = a1m
// a21x1 + a22x2 + ... + a2m-1xm-1 = a2m
//      ...        ...            ...
// an1x1 + an2x2 + ... + anm-1xm-1 = anm
std::vector<double> gaussian_elim(std::vector<std::vector<double> > a) {
    const int n = a.size();
#ifdef DEBUG
    assert (0 < n);
#endif
    const int m = a[0].size();
#ifdef DEBUG
    repeat (i, n) assert ((int)a[i].size() == m);
    assert (n == m-1);
#endif
    // make an upper diagonal matrix
    repeat (i, n) {
        {
            int pivot = -1;
            repeat_from (j, i, n) {
                const double eps = 1e-16;
                if (eps < std::abs(a[j][i])) { pivot = j; break; }
            }
#ifdef debug
            assert (pivot != -1);
#endif
            if (pivot != i) std::swap(a[i], a[pivot]);
        }
        repeat_from (j, i+1, m) a[i][j] /= a[i][i];
        a[i][i] = 1;
        repeat_from (j, i+1, n) {
            repeat_from (k, i+1, m) {
                a[j][k] -= a[j][i] * a[i][k];
            }
            a[j][i] = 0;
        }
    }
    // gather the solutions
    std::vector<double> result(n);
    repeat_rev (i, n) {
        result[i] = a[i][m-1];
        repeat_from (j, i+1, n) {
            result[i] -= a[i][j] * result[j];
        }
    }
    return result;
}
using namespace std;
int main() {
    // ax + by = c
    // dx + ey = f
    vector<vector<double> > v(2, vector<double>(3));
    vector<double> w;
    while (true) {
        repeat (i,2) repeat (j,3) cin >> v[i][j];
        if (cin.fail()) break;
        w = gaussian_elim(v);
        printf("%.3lf %.3lf\n", w[0], w[1]);
    }
    return 0;
}

Compiler output:
a.cc: In function 'std::vector<double> gaussian_elim(std::vector<std::vector<double> >)':
a.cc:69:13: error: 'assert' was not declared in this scope
   69 |             assert (pivot != -1);
      |             ^~~~~~
a.cc:20:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
   19 | #include <cmath>
  +++ |+#include <cassert>
   20 | #ifndef repeat
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: 'cin' was not declared in this scope
    6 |   while(  cin>>a >>b >>c >>d >>e >>f){
      |           ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:11:5: error: 'printf' was not declared in this scope
   11 |     printf("%.3f %.3f\n",x,y);
      |     ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | using namespace std;
Language: C++

import sys
 
for line in sys.stdin:
    a, b, c, d, e, f = map(float, line.split())
 
    x = (c * e - b * f)/(a * e - b * d)
    y = (a * f - c * d)/(a * e - b * d)
    print '%f %f' % (x, y)
     

Compiler output:
a.cc:8:11: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    8 |     print '%f %f' % (x, y)
      |           ^~~~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: 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 - a*e);
		if( fabs(x) < 0.0005 ) x = 0.0;
		if( fabs(y) < 0.0005 ) y = 0.0;
		cout << fixed << std::setprecision(3) << x << " " << y << "\n";
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: 'fabs' was not declared in this scope; did you mean 'labs'?
   10 |                 if( fabs(x) < 0.0005 ) x = 0.0;
      |                     ^~~~
      |                     labs
a.cc:11:21: error: 'fabs' was not declared in this scope; did you mean 'labs'?
   11 |                 if( fabs(y) < 0.0005 ) y = 0.0;
      |                     ^~~~
      |                     labs
Language: C++

#include<queue>
#include<stack>
#include<cstdio>
using namespace std;
double a,b,c,d,e,f,x,y;
int main(){
	while(cin>>a>>b>>c>>d>>e>>f){
		x=(c*e-f*b)/(a*e-d*b);
		y=(c-a*x)/b;
		printf("%.3f %.3f\n",x+(1e-10),y+(1e-10));
	}
	return 0;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: 'cin' was not declared in this scope
    7 |         while(cin>>a>>b>>c>>d>>e>>f){
      |               ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include<cstdio>
  +++ |+#include <iostream>
    4 | using namespace std;
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected primary-expression before '>>' token
    7 |   while(cin >> >> a >> b >> c >> d >> e >> f){
      |                ^~
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define it ::iterator
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double ESP=1e-10;
using namespace std;
int main(){
  double a,b,c,d,e,f;
  while(cin>>a>>b>>c>>d>>e>>f){
    double x=(c*e-b*f)/(a*e-b*d);
    double y=(c-a*x)/b;
    if(
    printf("%.3f %.3f\n",x,y);
  }
  

}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:3: error: expected primary-expression before '}' token
   26 |   }
      |   ^
a.cc:25:31: error: expected ')' before '}' token
   25 |     printf("%.3f %.3f\n",x,y);
      |                               ^
      |                               )
   26 |   }
      |   ~                            
a.cc:24:7: note: to match this '('
   24 |     if(
      |       ^
a.cc:26:3: error: expected primary-expression before '}' token
   26 |   }
      |   ^
Language: C++

module Input
	def numread()
		s = gets().split()
		p = Array.new()
		for i in 0...s.size()
			p[i] = s[i].to_i()
		end
		return p
	end
	
	module_function:numread
end

include Input

loop{
	if(STDIN.eof())
		break
	end
	w = numread()
	x = (w[2] * w[4] - w[1] * w[5]).to_f / (w[0] * w[4] - w[1] * w[3])
	y = (w[2] * w[3] - w[0] * w[5]).to_f / (w[1] * w[3] - w[0] * w[4])
	print(sprintf("%.3f %.3f\n",x,y))
}

Compiler output:
a.cc:5:26: error: too many decimal points in number
    5 |                 for i in 0...s.size()
      |                          ^~~~~~~~~~
a.cc:1:1: error: 'module' does not name a type
    1 | module Input
      | ^~~~~~
a.cc:1:1: note: C++20 'module' only available with '-fmodules-ts'
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:44: error: 'd' was not declared in this scope
    5 | while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f) != EOF){
      |                                            ^
Language: 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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: incompatible types in assignment of 'int' to 'double [10000]'
   13 |   if(x == 0){x = 0;}
      |              ~~^~~
a.cc:14:16: error: incompatible types in assignment of 'int' to 'double [10000]'
   14 |   if(y == 0){y = 0;}
      |              ~~^~~
Language: C++

#include<iostream>
#include<stdio.h>
using namespace std;
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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: incompatible types in assignment of 'int' to 'double [10000]'
   14 |   if(x == 0){x = 0;}
      |              ~~^~~
a.cc:15:16: error: incompatible types in assignment of 'int' to 'double [10000]'
   15 |   if(y == 0){y = 0;}
      |              ~~^~~
Language: C++

#include<iostream>
#include<stdio.h>
using namespace std;
int main(){
 double a,b,c,d,e,f,y[1000],x[1000];
 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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: incompatible types in assignment of 'int' to 'double [1000]'
   14 |   if(x == 0){x = 0;}
      |              ~~^~~
a.cc:15:16: error: incompatible types in assignment of 'int' to 'double [1000]'
   15 |   if(y == 0){y = 0;}
      |              ~~^~~
Language: C++

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

Compiler output:
a.cc:16:3: error: expected unqualified-id before 'return'
   16 |   return 0;
      |   ^~~~~~
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C++

#include <iostream>
#include <cstdio>
#include <vector> 

int main()
{
	std::vector<int> x, y;
	int a, b, c, d, p, q;
	while (scanf_s("%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(p*c - a*q / (b*c - a*d));
	}

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    9 |         while (scanf_s("%d %d %d %d %d %d", &a, &b, &p, &c, &d, &q) != EOF)
      |                ^~~~~~~
      |                scanf
Language: C++

include <stdio.h>

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

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

    return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <stdio.h>
      | ^~~~~~~
Language: C++

package task0004;

import java.util.Scanner;

public class Main {

	void run() {
		Scanner sc = new Scanner(System.in);

		while (sc.hasNext()) {
			double a = sc.nextInt();
			double b = sc.nextInt();
			double c = sc.nextInt();
			double d = sc.nextInt();
			double e = sc.nextInt();
			double f = sc.nextInt();

			// 連立方程式の解
			double x = (b * f - c * e) / (b * d - a * e);
			double y = (c * d - a * f) / (b * d - a * e);

			if (x == 0)
				x = 0;
			if (y == 0)
				y = 0;

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

			// BigDecimal ax = new BigDecimal(x);
			// BigDecimal ay = new BigDecimal(y);
			//
			// // 小数第4位を四捨五入
			// ax = ax.setScale(3, BigDecimal.ROUND_HALF_UP);
			// ay = ay.setScale(3, BigDecimal.ROUND_HALF_UP);
			//
			// System.out.println(ax + " " + ay);
		}

		sc.close();
	}

	void run1() {
		Scanner sc = new Scanner(System.in);

		double[] a = new double[6];

		while (sc.hasNext()) {
			for (int i = 0; i < 6; i++) {
				a[i] = sc.nextDouble();
			}

			double d = a[0] * a[4] - a[1] * a[3];
			double x = (a[4] * a[2] - a[1] * a[5]) / d;
			double y = (a[0] * a[5] - a[3] * a[2]) / d;

			if (x == 0)
				x = 0;
			if (y == 0)
				y = 0;

			System.out.printf("%.3f %.3f", x, y);
		}

		sc.close();
	}

	public static void main(String[] args) {
		new Main().run1();
	}

}

Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package task0004;
      | ^~~~~~~
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.Scanner;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: expected unqualified-id before 'public'
    5 | public class Main {
      | ^~~~~~
Language: C++

#include<iostream>
#include<iomanip>
using namespace std;

int main(){
	double a11,a12,c,a21,a22,f;
	while(cin>>a11>>a12>>c>>a21>>a22>>f){
		double x,y,delta=((double)a11*a22-(double)a12*a21);
		x=((double)a22*c-(double)a12*f)/delta;
		y=((double)a11*f-(double)c*a21)/delta;
		if(x>0){x=(double)(((int)((x*1000)+0.5))/1000);
		}else if{x=(double)(((int)((x*1000)-0.5))/1000);}else{x=0;}
		if(y>0){y=(double)(((int)((y*1000)+0.5))/1000);
		}else if{y=(double)(((int)((y*1000)-0.5))/1000);}else{y=0;}
		cout<<fixed<<setprecision(3)<<x<<" "<<y<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:25: error: expected '(' before '{' token
   12 |                 }else if{x=(double)(((int)((x*1000)-0.5))/1000);}else{x=0;}
      |                         ^
      |                         (
a.cc:12:66: error: 'else' without a previous 'if'
   12 |                 }else if{x=(double)(((int)((x*1000)-0.5))/1000);}else{x=0;}
      |                                                                  ^~~~
a.cc:14:25: error: expected '(' before '{' token
   14 |                 }else if{y=(double)(((int)((y*1000)-0.5))/1000);}else{y=0;}
      |                         ^
      |                         (
a.cc:14:66: error: 'else' without a previous 'if'
   14 |                 }else if{y=(double)(((int)((y*1000)-0.5))/1000);}else{y=0;}
      |                                                                  ^~~~
Language: C++

#include<stdio.h>
int main(){

double a,b,c,d,e,f,x,y,dd;
y=0;x=0;
 while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF){
dd=e*a-b*d;
if(dd!=0;){
y=(d*c-a*f)/(b*d-a*e);
x=(e*c-b*f)/(e*a-b*d);
x=(x==fabs(x))?fabs(x):x; 
y=(y==fabs(y))?fabs(y):y; 


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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: expected primary-expression before ')' token
    8 | if(dd!=0;){
      |          ^
a.cc:11:7: error: 'fabs' was not declared in this scope
   11 | x=(x==fabs(x))?fabs(x):x;
      |       ^~~~
Language: C++

import java.text.DecimalFormat;
import java.util.Scanner;

class Main {
public static void main(String[] args){
	Scanner scan = new Scanner(System.in);
	double a = Double.parseDouble(scan.next());
	double b = Double.parseDouble(scan.next());
	double c = Double.parseDouble(scan.next());
	double d = Double.parseDouble(scan.next());
	double e = Double.parseDouble(scan.next());
	double f = Double.parseDouble(scan.next());
	DecimalFormat df = new DecimalFormat("0.000");
	double x =(c*e-b*f)/(a*e-b*d);
	double y = (a*f-c*d)/(a*e-b*d);
	x = Math.floor((x+0.5)*1000)/1000;
	x = Math.ceil((x-0.5)*1000)/1000;
	y = Math.floor((y+0.5)*1000)/1000;
	y = Math.ceil((y-0.5)*1000)/1000;

	System.out.println(df.format(x)+" "+df.format(y) );


}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.text.DecimalFormat;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.Scanner;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:7: error: expected ':' before 'static'
    5 | public static void main(String[] args){
      |       ^~~~~~~
      |       :
a.cc:5:25: error: 'String' has not been declared
    5 | public static void main(String[] args){
      |                         ^~~~~~
a.cc:5:34: error: expected ',' or '...' before 'args'
    5 | public static void main(String[] args){
      |                                  ^~~~
a.cc:25:2: error: expected ';' after class definition
   25 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:6:9: error: 'Scanner' was not declared in this scope
    6 |         Scanner scan = new Scanner(System.in);
      |         ^~~~~~~
a.cc:7:20: error: 'Double' was not declared in this scope; did you mean 'double'?
    7 |         double a = Double.parseDouble(scan.next());
      |                    ^~~~~~
      |                    double
a.cc:7:39: error: 'scan' was not declared in this scope
    7 |         double a = Double.parseDouble(scan.next());
      |                                       ^~~~
a.cc:13:9: error: 'DecimalFormat' was not declared in this scope
   13 |         DecimalFormat df = new DecimalFormat("0.000");
      |         ^~~~~~~~~~~~~
a.cc:16:13: error: 'Math' was not declared in this scope
   16 |         x = Math.floor((x+0.5)*1000)/1000;
      |             ^~~~
a.cc:21:9: error: 'System' was not declared in this scope
   21 |         System.out.println(df.format(x)+" "+df.format(y) );
      |         ^~~~~~
a.cc:21:28: error: 'df' was not declared in this scope; did you mean 'f'?
   21 |         System.out.println(df.format(x)+" "+df.format(y) );
      |                            ^~
      |                            f
Language: C++

#include <cstdio>

using namespace std;

int main() {
    double a, b, c, d, e, f;
    double x, y;
    while (scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) != EOF) {
    	y = (c*d-f*a) / (b*d-e*a);
    	if (isnan(y)) y=0; 
    	x = (c-b*y) / a;
    	if (isnan(x)) x=0;
    	
    	printf("%.3f %.3f\n", x, y);
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'isnan' was not declared in this scope
   10 |         if (isnan(y)) y=0;
      |             ^~~~~
a.cc:12:13: error: 'isnan' was not declared in this scope
   12 |         if (isnan(x)) x=0;
      |             ^~~~~
Language: C++

int main(void){
double a,b,c,d,e,f,i,j,x,y;
while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f) != EOF) {
i=(c*e-f*b)/(a*e-d*b);
j=(c*d-f*a)/(b*d-e*a);
x=i+0.0005;
y=j+0.0005;
printf("%.3f %.3f\n",x,y);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:8: error: 'scanf' was not declared in this scope
    3 | while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f) != EOF) {
      |        ^~~~~
a.cc:3:56: error: 'EOF' was not declared in this scope
    3 | while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f) != EOF) {
      |                                                        ^~~
a.cc:1:1: note: 'EOF' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(void){
a.cc:8:1: error: 'printf' was not declared in this scope
    8 | printf("%.3f %.3f\n",x,y);
      | ^~~~~~
a.cc:8:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:10:2: error: expected '}' at end of input
   10 | }
      |  ^
a.cc:1:15: note: to match this '{'
    1 | int main(void){
      |               ^
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;
double A,B,C,D,E,F;
int main()
{
 while(cin >> A >> B >> C >> D >> E >> F){
  printf("%.3f %.3f\n",(c*e-b*f)/(a*e-d*b),(c*d-f*a)/(b*d-a*e));
 }
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:25: error: 'c' was not declared in this scope
    8 |   printf("%.3f %.3f\n",(c*e-b*f)/(a*e-d*b),(c*d-f*a)/(b*d-a*e));
      |                         ^
a.cc:8:27: error: 'e' was not declared in this scope
    8 |   printf("%.3f %.3f\n",(c*e-b*f)/(a*e-d*b),(c*d-f*a)/(b*d-a*e));
      |                           ^
a.cc:8:29: error: 'b' was not declared in this scope
    8 |   printf("%.3f %.3f\n",(c*e-b*f)/(a*e-d*b),(c*d-f*a)/(b*d-a*e));
      |                             ^
a.cc:8:31: error: 'f' was not declared in this scope
    8 |   printf("%.3f %.3f\n",(c*e-b*f)/(a*e-d*b),(c*d-f*a)/(b*d-a*e));
      |                               ^
a.cc:8:35: error: 'a' was not declared in this scope
    8 |   printf("%.3f %.3f\n",(c*e-b*f)/(a*e-d*b),(c*d-f*a)/(b*d-a*e));
      |                                   ^
a.cc:8:39: error: 'd' was not declared in this scope
    8 |   printf("%.3f %.3f\n",(c*e-b*f)/(a*e-d*b),(c*d-f*a)/(b*d-a*e));
      |                                       ^
Language: C++

#include <iostream>
#include <array>
#include <vector>
#include <cmath>
#include <iomanip>

using namespace std;

//?????¨?????\
double round_four(double value){
    value *= 1000;
    value += (value / fabs(value)) * 0.5;
    int nValue = static_cast<int>(value);
    value = static_cast<double>(nValue) / 1000;
    return value;
}

//????¬?????¨?????§£
array<double, 2> comp_linear_equation(int a, int b, int c, int d, int e, int f){
    array<double, 2> result;
    result[0] = static_cast<double>(e * c - (f * b));
    result[1] = static_cast<double>(-(d * c) + a * f);
    double num = 1.0 / ((a * e) - (b * d));
    result[0] *= num;
    result[1] *= num;
    result[0] = round_four(result[0]);
    result[1] = round_four(result[1]);
    return result;
}

//?????????
int main(){
    int a, b, c, d, e, f;
    vector<array<double, 2>> result;
    while (cin >> a >> b >> c >> d >> e >> f){
        result.push_back(comp_linear_equation(a, b, c, d, e, f));
    }
    for (const auto& element : result){
        for (auto num : element){
            cout << fixed << setprecision(3) << num << " ";
        }
        cout << endl;
    }
    return 0;
}

Compiler output:
a.cc:11:5: error: 'value' does not name a type
   11 |     value *= 1000;
      |     ^~~~~
a.cc:12:5: error: 'value' does not name a type
   12 |     value += (value / fabs(value)) * 0.5;
      |     ^~~~~
a.cc:13:35: error: 'value' was not declared in this scope; did you mean 'nValue'?
   13 |     int nValue = static_cast<int>(value);
      |                                   ^~~~~
      |                                   nValue
a.cc:14:5: error: 'value' does not name a type
   14 |     value = static_cast<double>(nValue) / 1000;
      |     ^~~~~
a.cc:15:5: error: expected unqualified-id before 'return'
   15 |     return value;
      |     ^~~~~~
a.cc:16:1: error: expected declaration before '}' token
   16 | }
      | ^
a.cc: In function 'std::array<double, 2> comp_linear_equation(int, int, int, int, int, int)':
a.cc:26:17: error: 'round_four' was not declared in this scope
   26 |     result[0] = round_four(result[0]);
      |                 ^~~~~~~~~~
Language: C++

#include <iostream>
#include <cstdio>
#define N 2
using namespace std;

class Calc{
    private:
    double A[N][N+1];
    int i, j, k;
    double tmp;
    public:
    void setNum(double**);
    void calcSi();
    void printSi();
};

void Calc::setNum(double** A){
    for(i=0;i<N;i++){
        for(j=0;j<N+1;j++){
            this->A[i][j] = A[i][j];
        }
    }
}

void Calc::calcSi(){
    for(i=0;i<N-1;i++){
        for(j=i+1;j<N;j++){
            tmp = A[j][i] / A[i][i];
            for(k=i+1; k<=N; k++)
                A[j][k] -= A[i][k] * tmp;
        }
    }

    for(i=N-1; i>=0; i--){
        tmp = A[i][N];
        for(j=i+1;j<N;j++)
            tmp -= A[i][j] * A[j][N];
        A[i][N] = tmp / A[i][i];
    }
}

void Calc::printSi(){
    for(i=0;i<N;i++){
        printf("%.3f",A[i][N]);
        if(i != N) {
            cout << " ";
        }
    }
    cout << endl;
}

int main(void){
    Calc c;
    double A[N][N+1];
    while(cin >> A[0][0] >> A[0][1] >> A[0][2] >> A[1][0] >> A[1][1] >> A[1][2]){
        c.setNum(A);
        c.calcSi();
        c.printSi();
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:56:18: error: cannot convert 'double [2][3]' to 'double**'
   56 |         c.setNum(A);
      |                  ^
      |                  |
      |                  double [2][3]
a.cc:17:28: note:   initializing argument 1 of 'void Calc::setNum(double**)'
   17 | void Calc::setNum(double** A){
      |                   ~~~~~~~~~^
Language: C++

require("fs").readFileSync("/dev/stdin","utf8").trim().split('\n').map(function(z){i=z.split(' ');console.log(x=((i[2]*i[4]-i[1]*i[5])/(i[0]*i[4]-i[1]*i[3])).toFixed(3),((i[2]-i[0]*x)/i[1]).toFixed(3))})

Compiler output:
a.cc:1:8: error: expected constructor, destructor, or type conversion before '(' token
    1 | require("fs").readFileSync("/dev/stdin","utf8").trim().split('\n').map(function(z){i=z.split(' ');console.log(x=((i[2]*i[4]-i[1]*i[5])/(i[0]*i[4]-i[1]*i[3])).toFixed(3),((i[2]-i[0]*x)/i[1]).toFixed(3))})
      |        ^
a.cc:1:203: error: expected unqualified-id before ')' token
    1 | require("fs").readFileSync("/dev/stdin","utf8").trim().split('\n').map(function(z){i=z.split(' ');console.log(x=((i[2]*i[4]-i[1]*i[5])/(i[0]*i[4]-i[1]*i[3])).toFixed(3),((i[2]-i[0]*x)/i[1]).toFixed(3))})
      |                                                                                                                                                                                                           ^
Language: 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));
		if (x==0) x=0;
		if (y==0) y=0;
		printf("%.3f %.3f\n" , ans1 , ans2);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: 'x' was not declared in this scope
   10 |                 if (x==0) x=0;
      |                     ^
a.cc:11:21: error: 'y' was not declared in this scope
   11 |                 if (y==0) y=0;
      |                     ^
Language: C++

#include <math.h>
#include <iostream>
#include <ios>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <string>

#define YES "YES"
#define NO "NO"
#define space ' '

using namespace std;

void func();

int main(void)
{
	
	func();

	return 0;
}

// using matrix	?????????????????´??????
void func()
{
	int a, b, c, d, e, f;
	double x, y;

	while (cin >> a >> b >> c >> d >> e >> f, !cin.eof()){


	//	if ((a*e - d*b) == 0)
		{
		//	cout << 0 << space << 0 << endl;
		}
		else
		{
			x = (e*c - b*f) / (a*e - d*b);
			y = (-d*c + a*f) / (a*e - d*b);

			cout << fixed << setprecision(3);
			cout << x*0.0005 << space << y+0.0005 << endl;
			cout << dec;
		}
	}
}

Compiler output:
a.cc: In function 'void func()':
a.cc:38:17: error: 'else' without a previous 'if'
   38 |                 else
      |                 ^~~~
Language: C++

#include<iostream>
#include<cstdio>

/*
 * Wrong Answer
 * 2015-06-26 02:00
 */

int main(void)
{
	int a. b. c. d. e. f;
	double x, y;

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

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: expected initializer before '.' token
   11 |         int a. b. c. d. e. f;
      |              ^
a.cc:14:28: error: 'a' was not declared in this scope
   14 |         while( std::cin >> a >> b >> c >> d >> e >> f ){
      |                            ^
a.cc:14:33: error: 'b' was not declared in this scope
   14 |         while( std::cin >> a >> b >> c >> d >> e >> f ){
      |                                 ^
a.cc:14:38: error: 'c' was not declared in this scope
   14 |         while( std::cin >> a >> b >> c >> d >> e >> f ){
      |                                      ^
a.cc:14:43: error: 'd' was not declared in this scope
   14 |         while( std::cin >> a >> b >> c >> d >> e >> f ){
      |                                           ^
a.cc:14:48: error: 'e' was not declared in this scope
   14 |         while( std::cin >> a >> b >> c >> d >> e >> f ){
      |                                                ^
a.cc:14:53: error: 'f' was not declared in this scope
   14 |         while( std::cin >> a >> b >> c >> d >> e >> f ){
      |                                                     ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:15: error: 'scanf' was not declared in this scope
    3 |         while(scanf("%f",&a)){
      |               ^~~~~
a.cc:7:9: error: 'printf' was not declared in this scope
    7 |         printf("%.3f %.3f",x,y);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
a.cc:8:14: error: 'cout' is not a member of 'std'
    8 |         std::cout<<std::endl;
      |              ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main(){
a.cc:8:25: error: 'endl' is not a member of 'std'
    8 |         std::cout<<std::endl;
      |                         ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | int main(){
Language: C++

#include<iostream>
#include<iomanip>
int main(){
	float a, b, c, d, e, f;
	float x, y;
	while (std::cin >> a >> b >> c >> d >> e >> f){
		if (a*d<0){
			d = -d;
			e = -e;
			f = -f;
		}

		x = (c - b*(c - f*a / d) / (b - e*a / d)) / a;
		y = (c - f*a / d) / (b - e*a / d);
		if (x == 0)x = 0;
		if (y == 0)y = 0;
		x = round(x);
		y = round(y);
		std::cout<<std::fixed<<std::setprecision(4)  << x << " " << y << std::endl;
	}
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:21: error: 'round' was not declared in this scope
   17 |                 x = round(x);
      |                     ^~~~~
Language: 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 = (c-b*(c*d-a*f)/(b*d-a*e))/a; 
    y = (c*d-a*f)/(b*d-a*e);
    if(x == -0)x = 0;
    if(y == -0)y = 0;
    pirntf("%3f %3f",x,y);
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'pirntf' was not declared in this scope; did you mean 'printf'?
   12 |     pirntf("%3f %3f",x,y);
      |     ^~~~~~
      |     printf
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <cassert>
#include <iomanip>

#define EPS (1e-6)

void solveSimultaneousEquation(double a, double b, double c, double d, double e, double f, 
                               std::pair<double, double>* pResult)
{
  assert(b * d - a * e != 0);
  std::pair<double, double>& result = *pResult;

  result.first = (b * f - c * e) / (b * d - a * e);
  result.second = (c * d - a * f) / (b * d - a * e);

  if (fabs(result.first) < EPS) {
    result.first = 0.0;
  }
  if (fabs(result.second) < EPS) {
    result.first = 0.0;
  }
}

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

  while (std::cin >> a >> b >> c >> d >> e >> f) {
    std::pair<double, double> result;
    solveSimultaneousEquation(a, b, c, d, e, f, &result);
    std::cout << std::fixed << std::setprecision(3) << result.first << " " << result.second << std::endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'void solveSimultaneousEquation(double, double, double, double, double, double, std::pair<double, double>*)':
a.cc:19:7: error: 'fabs' was not declared in this scope; did you mean 'labs'?
   19 |   if (fabs(result.first) < EPS) {
      |       ^~~~
      |       labs
a.cc:22:7: error: 'fabs' was not declared in this scope; did you mean 'labs'?
   22 |   if (fabs(result.second) < EPS) {
      |       ^~~~
      |       labs
Language: C++

#include <cstdio>
#include <iostream>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: expected primary-expression before ')' token
    8 |  while(){
      |        ^
a.cc:10:7: error: invalid operands of types 'double' and 'const char [2]' to binary 'operator=='
   10 |   if(a=="\n") break;
      |      ~^~~~~~
      |      |  |
      |      |  const char [2]
      |      double
Language: C++

#include <cstdio>
#include <iostream>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: invalid operands of types 'double' and 'const char [2]' to binary 'operator=='
   10 |   if(a=="\n") break;
      |      ~^~~~~~
      |      |  |
      |      |  const char [2]
      |      double
Language: C++

#include<stdio.h>
 
int main(void){

double a, b, c,d,e,f,x,y;
while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)\=EOF){
y=(a*f-c)/(e-d*b);
x=(f-e*y)/a;
printf("%-3f %-3f", x, y);
}
return 0;
}
 

Compiler output:
a.cc:6:51: error: stray '\' in program
    6 | while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)\=EOF){
      |                                                   ^
a.cc: In function 'int main()':
a.cc:6:12: error: lvalue required as left operand of assignment
    6 | while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)\=EOF){
      |       ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

from sympy import *

a, b, c, d, e, f = map(int, raw_input().strip().split(' '))

x, y = symbols('x y')

# ax + by = c
# dx + ey = f
res = solve((a*x+b*y - c , d*x+e*y - f), x, y)
x = res[x]
y = res[y]
x = float(str(x))
y = float(str(y))
print "%.3f %.3f" % (x, y)

Compiler output:
a.cc:5:16: warning: multi-character character constant [-Wmultichar]
    5 | x, y = symbols('x y')
      |                ^~~~~
a.cc:7:3: error: invalid preprocessing directive #ax
    7 | # ax + by = c
      |   ^~
a.cc:8:3: error: invalid preprocessing directive #dx
    8 | # dx + ey = f
      |   ^~
a.cc:1:1: error: 'from' does not name a type
    1 | from sympy import *
      | ^~~~
Language: C++

#include <iostream>
#include <iomanip>
#include <cstdio>

#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);

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

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

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:29: error: expected ';' before '}' token
   29 |                 if(X==0){X=0};
      |                             ^
      |                             ;
a.cc:30:29: error: expected ';' before '}' token
   30 |                 if(Y==0){Y=0};
      |                             ^
      |                             ;