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

#include <conio.h>
#include <iostream>
#include <iomanip>
#include <math.h>
using namespace std;

int main()
{
	int a,b,c,d,e,f;
	double x,y;
	while(cin>>a>>b>>c>>d>>e>>f)
	{
		-1000 <= a, b, c, d, e, f <= 1000;
		x= (c*e-b*f)/(a*e-b*d);
		y= (c*d-a*f)/(b*d-a*e);
		
		cout<<setprecision(3)<<fixed;
		cout<<x<<" "<<y<<endl;
	}
        cin.get();
        getch();
	return 0;
}
	
	

Compiler output:
a.cc:1:10: fatal error: conio.h: No such file or directory
    1 | #include <conio.h>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include <conio.h>
#include <iostream>
#include <iomanip>
#include <math.h>
using namespace std;

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

Compiler output:
a.cc:1:10: fatal error: conio.h: No such file or directory
    1 | #include <conio.h>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
using namespace std;

int main(){
double a,b,c,d,e,f,x,y;
while(cin>>a>>b>>c>>d>>e>>f){
x=(c-f*b/e)/(a-d*b/e)+0.0005;
y=(c-a*x)/b+0.0005;
x-=x%0.001;
y-=y%0.001;
cout<<x<<" "<<y<<endl;}}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: invalid operands of types 'double' and 'double' to binary 'operator%'
    9 | x-=x%0.001;
      |    ~^~~~~~
      |    | |
      |    | double
      |    double
a.cc:10:5: error: invalid operands of types 'double' and 'double' to binary 'operator%'
   10 | y-=y%0.001;
      |    ~^~~~~~
      |    | |
      |    | double
      |    double
Language: C++

#include<stdio.h>
#include<math.h>

int main(){
	double A[2][3],x,y,i;

	/*
	printf("6つの実数を入力してください 例:6 3 4 8 9 1\n");
	scanf("%lf%lf%lf%lf%lf%lf",&A[0][0],&A[0][1],&A[0][2],&A[1][0],&A[1][1],&A[1][2]);

	printf("連立方程式%lfx+%lfy=%lf,%lfx+%lfy=%lfを解きます\n",A[0][0],A[0][1],A[0][2],A[1][0],A[1][1],A[1][2]);
	*/

	while(scanf("%lf%lf%lf%lf%lf%lf",&A[0][0],&A[0][1],&A[0][2],&A[1][0],&A[1][1],&A[1][2]) != EOF){
	
		//掃き出し法で
		for(i=2;i>=0;i--){
			A[0][i] /= A[0][0];
		}
	
		for(int i=2;i>=0;i--){
			A[1][i] -= A[0][i] * A[1][0];
		}

		if(A[1][1] == 0){
			if(A[1][2] == 0){
				printf("解はすべての実数\n");
			}else{
				printf("解無し\n");
			}
			return 0;
		}

		y = A[1][2] / A[1][1];
		x = A[0][2] - A[0][1]*y;

		printf("x = %lf ,y = %lf\n",x,y);

		x *= 1e+3;
		y *= 1e+3;

		//切上げ処理
		x = floor(x+0.5)*(1e-3);
		y = floor(y+0.5)*(1e-3);

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

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:29: error: invalid types 'double [3][double]' for array subscript
   18 |                         A[0][i] /= A[0][0];
      |                             ^
Language: C++

#include<stdio.h>

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

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

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

#include<stdio.h>

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

int main(){
  int a,b,c,d,e,f;
  float ansX,ansY;

  scanf ("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f);
  printFunc(a,b,c,d,e,f);
  scanf ("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f);
  printFunc(a,b,c,d,e,f);

  return 0;
}

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

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

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

Compiler output:
a.cc: In function 'void printFunc(int, int, int, int, int, int)':
a.cc:19:5: error: 'ansY' was not declared in this scope
   19 |     ansY = 0;
      |     ^~~~
a.cc:22:5: error: 'ansY' was not declared in this scope
   22 |     ansY = (float)(b*f - e*c)/(float)(b*d - e*a);
      |     ^~~~
a.cc:26:5: error: 'ansX' was not declared in this scope
   26 |     ansX = 0;
      |     ^~~~
a.cc:29:5: error: 'ansX' was not declared in this scope
   29 |     ansX = (float)(c*e - f*b)/(float)(a*e - d*b);
      |     ^~~~
a.cc:32:24: error: 'ansX' was not declared in this scope
   32 |   printf("%.3f %.3f\n",ansX,ansY);
      |                        ^~~~
a.cc:32:29: error: 'ansY' was not declared in this scope
   32 |   printf("%.3f %.3f\n",ansX,ansY);
      |                             ^~~~
Language: C++

#include <iostream>
#include <cstdio>

using namespace std;

int main(int argc, char *argv[]) {
  double a, b, c, d, e, f;

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

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:27:33: error: expected ')' before ';' token
   27 |     printf("%.3lf %.3lf\n", x, y;
      |           ~                     ^
      |                                 )
a.cc:29:2: error: expected '}' at end of input
   29 | }
      |  ^
a.cc:6:34: note: to match this '{'
    6 | int main(int argc, char *argv[]) {
      |                                  ^
Language: C++

(function set_utils(undefined){
	this.print_float = function print_float(val, base, pad, prec) {
		var p10=Math.pow(10,prec);
		var ival=""+Math.round(val*p10);
		if ( ival === '0' )
			return '0.'+Array(prec+1).join('0');
		var ilen=ival.length-prec;
		if(ilen===0)
			return "0."+ival.substr(ilen,prec);
		return ival.substr(0,ilen)+"."+ival.substr(ilen,prec);
	};
}).call(global);

(function(undefined){
	'use strict';

	(function init() {
		this.output = function() {
			console.log.apply( console, arguments );
		};
		this.stdin = process.openStdin();
		stdin.setEncoding('utf8');
		this.input_list = [];
		stdin.on('data', function(chunk){
			var result = chunk.match(/[-]?\d+/g);
			input_list = input_list.concat(result);
		});
		stdin.on('end', function(){
			fire();
		});
		this.input_number = function() {
			return parseInt( input_list.splice(0,1)[0] );
		};
		this.has_next = function() {
			return ! input_list.length;
		};
	}).call( this );

	(function solver(){
		function sq(x) {
			return x * x;
		}
		function check(v) {
		}
		this.fire = function() {
			setTimeout( function solve() {
				var a = input_number();
				var b = input_number();
				var c = input_number();
				var d = input_number();
				var e = input_number();
				var f = input_number();
				var delta = 1.0 / ( a*e - b*d );
				var x = ( e * c - b * f ) * delta;
				var y = ( a * f - d * c ) * delta;
				output( print_float(x,10,3,3) + ' ' + print_float(y,10,3,3)  );
				if ( ! has_next() )
					setTimeout( solve, 0, this );
			}, 0, this );
		};
	}).call(this);

}).call(global);

Compiler output:
a.cc:6:32: warning: multi-character character constant [-Wmultichar]
    6 |                         return '0.'+Array(prec+1).join('0');
      |                                ^~~~
a.cc:15:9: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
   15 |         'use strict';
      |         ^~~~~~~~~~~~
a.cc:22:35: warning: multi-character character constant [-Wmultichar]
   22 |                 stdin.setEncoding('utf8');
      |                                   ^~~~~~
a.cc:24:26: warning: multi-character character constant [-Wmultichar]
   24 |                 stdin.on('data', function(chunk){
      |                          ^~~~~~
a.cc:25:55: error: stray '\' in program
   25 |                         var result = chunk.match(/[-]?\d+/g);
      |                                                       ^
a.cc:28:26: warning: multi-character character constant [-Wmultichar]
   28 |                 stdin.on('end', function(){
      |                          ^~~~~
a.cc:1:10: error: expected ')' before 'set_utils'
    1 | (function set_utils(undefined){
      | ~        ^~~~~~~~~~
      |          )
a.cc:12:2: error: expected unqualified-id before ')' token
   12 | }).call(global);
      |  ^
a.cc:14:10: error: expected ')' before '(' token
   14 | (function(undefined){
      | ~        ^
      |          )
a.cc:63:2: error: expected unqualified-id before ')' token
   63 | }).call(global);
      |  ^
Language: C++

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

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

int main(void){
	//cin>>a>>b>>c>>d>>e>>f;
	while(cin>>a>>b>>c>>d>>e>>f){
		double x,y;
		/*
		ax+by=c;
		dx+ey=f;
		ax=c-by;
		x=(c-by)/a;
		d(c-by)/a+ey=f;
		dc/a-dby/a+ey=f;
		-dby/a+ey=f-dc/a;
		(e-db/a)y=f-dc/a;
		y=(f-dc/a)/(e-db/a);
		y=(fa-dc)/(ae-db)
		x=(c-by)/a;
		*/
		y=(f*a-d*c)/(a*e-d*b);
		x=(c-b*y)/a;
		cout<<fixed<<setprecision(3);
		cout<<x<<" "<<y<<endl;
	//}
		//cin>>a;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:2: error: expected '}' at end of input
   30 | }
      |  ^
a.cc:7:15: note: to match this '{'
    7 | int main(void){
      |               ^
Language: C++

#include<stdio.h>
void main()
{
  float a,b,c,d,e,f;
  float x,y;
  scanf("%f%f%f%f%f%f",&a,&b,&c,&d,&e,&f);
  y=(c*d-a*f)/(b*d-a*e);
  x=(c-b*y)/a;
  printf("x=%f,y=%f",x,y);
} 

Compiler output:
a.cc:2:1: error: '::main' must return 'int'
    2 | void main()
      | ^~~~
Language: C++

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

double* solve_equations(int *a)
{
	// クラメルの公式を用いる
	int data_size=sizeof(a[0]);
	/*cout << "data_size=" << data_size << endl;
	cout << "a=" << a << endl;
	cout << "*(a + data_size*1)=" << *(a + 1) << endl;
	cout << "*(a + data_size*0) * *(a + data_size*4)" << *(a + data_size*0) * *(a + data_size*4) << endl; */
	int z = *(a + 0) * *(a + 4) 
		  - *(a + 1) * *(a + 3);
	int x = *(a + 2) * *(a + 4)
		  -	*(a + 1) * *(a + 5);
	int y = *(a + 0) * *(a + 5)
		  - *(a + 2) * *(a + 3);  
	double ax,ay;
	/*cout << "x=" << x << endl;
	cout << "y=" << y << endl;*/
	ax = pow(z,-1)*x;
	ay = pow(z,-1)*y;
	
	/* cout << ax << endl;
	cout << ay << endl; */
	double ans[2] = {ax,ay};
	return ans;
}

int main()
{
	int *p;
	int a[6] = {1,2,3,4,5,6};
	/*
	p = solve_equations(a);
	cout << *p << *(p + 1) << endl;*/

	int n[6];
	while (cin){
		for (int i=0;i<=5;i++)
		{
			if(!(cin >> n[i]))
				break;
		}
		double *ans;
		ans = solve_equations(n);
		cout << setprecision(3) << ans[0] << ' '<< ans[1] << endl;
	}
			// cout << l[0]  endl;
}
		
	

Compiler output:
a.cc: In function 'double* solve_equations(int*)':
a.cc:22:14: error: 'pow' was not declared in this scope
   22 |         ax = pow(z,-1)*x;
      |              ^~~
a.cc:28:16: warning: address of local variable 'ans' returned [-Wreturn-local-addr]
   28 |         return ans;
      |                ^~~
a.cc:27:16: note: declared here
   27 |         double ans[2] = {ax,ay};
      |                ^~~
Language: C++

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

double* solve_equations(int *a)
{
	// クラメルの公式を用いる
	int data_size=sizeof(a[0]);
	/*cout << "data_size=" << data_size << endl;
	cout << "a=" << a << endl;
	cout << "*(a + data_size*1)=" << *(a + 1) << endl;
	cout << "*(a + data_size*0) * *(a + data_size*4)" << *(a + data_size*0) * *(a + data_size*4) << endl; */
	int z = *(a + 0) * *(a + 4) 
		  - *(a + 1) * *(a + 3);
	int x = *(a + 2) * *(a + 4)
		  -	*(a + 1) * *(a + 5);
	int y = *(a + 0) * *(a + 5)
		  - *(a + 2) * *(a + 3);  
	double ax,ay;
	/*cout << "x=" << x << endl;
	cout << "y=" << y << endl;*/
	ax = pow(z,-1)*x;
	ay = pow(z,-1)*y;
	
	/* cout << ax << endl;
	cout << ay << endl; */
	double ans[2] = {ax,ay};
	return ans;
}

int main()
{
	int *p;
	int a[6] = {1,2,3,4,5,6};
	/*
	p = solve_equations(a);
	cout << *p << *(p + 1) << endl;*/

	int n[6];
	while (cin){
		for (int i=0;i<=5;i++)
		{
			if(!(cin >> n[i]))
				break;
		}
		double *ans;
		ans = solve_equations(n);
		cout << fixed << setprecision(3) << ans[0] << ' '<< ans[1] << endl;
	}
			// cout << l[0]  endl;
}
		
	

Compiler output:
a.cc: In function 'double* solve_equations(int*)':
a.cc:22:14: error: 'pow' was not declared in this scope
   22 |         ax = pow(z,-1)*x;
      |              ^~~
a.cc:28:16: warning: address of local variable 'ans' returned [-Wreturn-local-addr]
   28 |         return ans;
      |                ^~~
a.cc:27:16: note: declared here
   27 |         double ans[2] = {ax,ay};
      |                ^~~
Language: C++

#include <iostream>
#include <iomanip>
#include <stdio.h>
using namespace std;

double* solve_equations(int *a)
{
	// クラメルの公式を用いる
	int data_size=sizeof(a[0]);
	/*cout << "data_size=" << data_size << endl;
	cout << "a=" << a << endl;
	cout << "*(a + data_size*1)=" << *(a + 1) << endl;
	cout << "*(a + data_size*0) * *(a + data_size*4)" << *(a + data_size*0) * *(a + data_size*4) << endl; */
	int z = *(a + 0) * *(a + 4) 
		  - *(a + 1) * *(a + 3);
	int x = *(a + 2) * *(a + 4)
		  -	*(a + 1) * *(a + 5);
	int y = *(a + 0) * *(a + 5)
		  - *(a + 2) * *(a + 3); 
	double ax,ay;
	/*cout << "x=" << x << endl;
	cout << "y=" << y << endl;*/
	ax = pow(z,-1)*x;
	ay = pow(z,-1)*y;
	
	/* cout << ax << endl;
	cout << ay << endl; */
	double ans[2] = {ax,ay};
	return ans;
}

int main()
{
	int n[6];
	int s;
	int i=0;
	while (cin >> s){
		if (i == 5){
			n[i]=s;
			/* for (int j=0;j<=5;j++)
			{
				cout << "n[" << j << "]=" << n[j] << endl;
			}*/
			double* an;
			an = solve_equations(n);
			/* printf("%.3lf",*(an+0));
			cout << " " << endl;
			printf("%.3lf",*(an+1)); */
			if (an[1] == 0)
				cout << fixed << setprecision(3) << an[0] << " " << 0.000 << endl;
			else if(an[0] == 0)
				cout << fixed << setprecision(3) << 0.000 << " " << an[1] << endl;
			else
				cout << fixed << setprecision(3) << an[0] << " " << an[1] << endl;

			i = 0;}
		else{
			n[i]=s;
			i++;
		}
	}
	return 0;
			// cout << l[0]  endl;
}

Compiler output:
a.cc: In function 'double* solve_equations(int*)':
a.cc:23:14: error: 'pow' was not declared in this scope
   23 |         ax = pow(z,-1)*x;
      |              ^~~
a.cc:29:16: warning: address of local variable 'ans' returned [-Wreturn-local-addr]
   29 |         return ans;
      |                ^~~
a.cc:28:16: note: declared here
   28 |         double ans[2] = {ax,ay};
      |                ^~~
Language: C++

#include <algorithm>
#include <iostream>

using namespace std;

int main(){
    int t;
    double a, b, c, d, e, f, x, y;
    cin >> t;
    while(t--){
        cin >> a >> b >> c >> d >> e >> f;
        y = (c/(d)a - f/d)/(b/a - e/d);
        x = (c-b*y)/a;
        cout << x << " " << y << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: expected ')' before 'a'
   12 |         y = (c/(d)a - f/d)/(b/a - e/d);
      |             ~     ^
      |                   )
Language: C++

#include<iostream>
#include<vector>
#include<iomanip>

using namespace std;

typedef struct Shiki{
  double a,b,c;//ax+by=c
  double x,y;
};

Shiki Equation (Shiki, Shiki);

main(){
  Shiki shiki1,shiki2;
  vector<Shiki> ans;
  int i=0;
  
  while(cin){

    cin>>shiki1.a>>shiki1.b>>shiki1.c>>shiki2.a>>shiki2.b>>shiki2.c;
    ans.push_back(Equation(shiki1,shiki2));
    i++;
    
  }
  cout<<"hogee"<<endl;
  for(int j=0;j<i;j++){
    cout<< fixed << setprecision(4) << ans[j].x << " " << ans[j].y << endl; 
  }
}

Shiki Equation (Shiki A, Shiki B){
  Shiki ans,preA;
  int x,y,aa,ba;
  
  preA = A;

  aa = A.a;
  ba = B.a;
  
  A.a *= ba;
  A.b *= ba;
  A.c *= ba;
  
  B.a *= aa;
  B.b *= aa;
  B.c *= aa;
  
  ans.a = 0;
  ans.b = A.b - B.b;
  ans.c = A.c - B.c;
  ans.y = ans.c / ans.b;
  ans.x = (preA.c - preA.b*ans.y)/preA.a;
  
  if((ans.y*1000)%10 >= 5)ans.y += 0.0001;
  if((ans.y*1000)%10 >= 5)ans.x += 0.0001;
  
  return ans;
}

Compiler output:
a.cc:7:1: warning: 'typedef' was ignored in this declaration
    7 | typedef struct Shiki{
      | ^~~~~~~
a.cc:14:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   14 | main(){
      | ^~~~
a.cc: In function 'Shiki Equation(Shiki, Shiki)':
a.cc:55:18: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   55 |   if((ans.y*1000)%10 >= 5)ans.y += 0.0001;
      |      ~~~~~~~~~~~~^~~
      |            |      |
      |            double int
a.cc:56:18: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   56 |   if((ans.y*1000)%10 >= 5)ans.x += 0.0001;
      |      ~~~~~~~~~~~~^~~
      |            |      |
      |            double int
Language: C++

import java.util.Scanner;

public class Main {
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
			double a = sc.nextDouble();
			double b = sc.nextDouble();
			double c = sc.nextDouble();
			double d = sc.nextDouble();
			double e = sc.nextDouble();
			double f = sc.nextDouble();
					   b = b*d;
					   c = c*d;
					   e = e*a;
					   f = f*a;

					double y = (c-f)/(b-e);
					double x = (c-(b*y))/(a*d);
					x = (int)((x * 1000)+0.5);
					y = (int)((y * 1000)+0.5);
			System.out.println((double)x/1000 +" "+ (double)y/1000);
	}
}

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

#include<iostream>
#include <iomanip.h>

using namespace std;

int main()
{
 double a,b,c,d,e,f;
 double n;
 double x,y,ty,tc;
	while( cin>>a>>b>>c>>d>>e>>f )
	{
 	n=(a/d);
 	d = d * n;
 	e = e * n;
 	f = f * n;

	ty = b-e; 	
 	tc = c-f;
 	y = tc/ty;

 	tc = c - (b*y);
 	x = tc/a;
 	
 	cout << setiosflags(ios::fixed);
	cout << setprecision(3);
 	cout << x <<" "<< y <<endl;
 	
	}
 
}

Compiler output:
a.cc:2:10: fatal error: iomanip.h: No such file or directory
    2 | #include <iomanip.h>
      |          ^~~~~~~~~~~
compilation terminated.
Language: C++

#include <stdio.h>

void Renritsu(double a,double b,double c,double d,double e,double f){
	double ta = a * d;
	double tb = b * d;
	double tc = c * d;
	double td = d * a;
	double te = e * a;
	double tf = f * a;
	td -= ta;
	te -= tb;
	tf -= tc;
	double y = tf / te;
	ta = a * e;
	tb = b * e;
	tc = c * e;
	td = d * b;
	te = e * b;
	tf = f * b;
	td -= ta;
	te -= tb;
	tf -= tc;
	double x = tf / td;
	printf("%.3lf %.3lf \n",x,y);
}


void main()
{
	Renritsu(1,2,3,4,5,6);
	Renritsu(2,-1,-2,-1,-1,-5);
}

Compiler output:
a.cc:28:1: error: '::main' must return 'int'
   28 | void main()
      | ^~~~
Language: C++

int gcm(int a,int b){
	int c=a%b;
	while(c!=0){
		a=b;
		b=c;
		c=a%b;
        }
	return b;
}

int main(){
	int x[2],y[3],sum[3];
	double ans[2];
	while(cin>>x[0]>>y[0]>>sum[0]>>x[1]>>y[1]>>sum[1]){
		if(x[0]==0){
			ans[1]=(double)sum[0]/y[0];
			ans[0]=(sum[1]-y[1]*ans[1])/x[1];
		}else if(x[1]==0){
			ans[1]=(double)sum[1]/y[1];
			ans[0]=(sum[0]-y[0]*ans[1])/x[0];
		}else if(y[0]==0){
			ans[0]=(double)sum[0]/x[0];
			ans[1]=(sum[1]-x[1]*ans[0])/y[1];
		}else if(y[1]==0){
			ans[0]=(double)sum[1]/x[1];
			ans[1]=(sum[0]-x[0]*ans[0])/y[0];
		}else{
			y[2]=y[0]*x[1]-y[1]*x[0];
			sum[2]=sum[0]*x[1]-sum[1]*x[0];
			ans[1]=(double)sum[2]/y[2];
			ans[0]=(sum[0]-y[0]*ans[1]);
		}
		printf("%.3f %.3f\n",ans[0],ans[1]);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: 'cin' was not declared in this scope
   14 |         while(cin>>x[0]>>y[0]>>sum[0]>>x[1]>>y[1]>>sum[1]){
      |               ^~~
a.cc:33:17: error: 'printf' was not declared in this scope
   33 |                 printf("%.3f %.3f\n",ans[0],ans[1]);
      |                 ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int gcm(int a,int b){
Language: C++

#include<stdio.h>

int main(){
	double x1,y1,z1,x2,y2,z2,num1=0,x=0,y=0,z=0,sum1=0,sum2=0,vx=0,vy=0,vz=0;
	
	scanf("%lf %lf %lf %lf %lf %lf",&x1,&y1,&z1,&x2,&y2,&z2);
	
	
	
	
	if((x1>0&&x2>0)||(x1<0&&x2>0)){
		num1=x2/x1*-1;
	}
	else if((x1>0&&x2<0)||(x1<0&&x2<0)){
		num1=x2/x1;
	}
	else if()
	
	
	vx=x1*num1;
	vy=y1*num1;
	vz=z1*num1;
	
	x=vx+x2;
	y=vy+y2;
	z=vz+z2;
		
	sum2=z/y;
	sum1=(z2-y2*sum2)/x2;
	
	
	
	
	if(sum1>=0){
	sum1=(int)(sum1*1000+0.5);
	sum1=(double)(sum1/1000);
	}
		else if(sum1<0){
	sum1=(int)(sum1*1000-0.5);
	sum1=(double)(sum1/1000);
	}
	if(sum2>=0){
	sum2=(int)(sum2*1000+0.5);
	sum2=(double)(sum2/1000);
	}
		else if(sum2<0){
	sum2=(int)(sum2*1000-0.5);
	sum2=(double)(sum2/1000);
	}
	
	
	
	printf("%.3f %.3f\n",sum1,sum2);
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: expected primary-expression before ')' token
   17 |         else if()
      |                 ^
Language: C++

while line = gets
  (a, b, c, d, e, f) = line.split(" ").map{|str|Integer str}
  z = a*e - b*d
  x = (c*e-f*b)/z + 0.000
  y = (f*a-c*d)/z + 0.000
  puts sprintf("%.3f %.3f", x, y)
end

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while line = gets
      | ^~~~~
a.cc:3:3: error: 'z' does not name a type
    3 |   z = a*e - b*d
      |   ^
Language: C++

try :
  while True :
    (a,b,c,d,e,f) = map(int, raw_input().split())

    print "%.3f %.3f"%((c*e-b*f)/(a*e-b*d), (a*f-c*d)/(a*e-b*d))
except EOFError :
  pass

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'try'
    1 | try :
      | ^~~
Language: C++

#include<iostream>
#include<iomanip>
#include<stdio.h>

using namespace std;

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

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

		double tempb = b;

		a*=e;b*=e;c*=e;
		d*=tempb;e*=tempb;f*=tempb;
		a-=d;b-=e;c-=f;

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

		if(x == -0)
			x = 0;
		if(y == -0)
			y = 0;
		x = floor((x+0.0005)*1000)/1000;
		y = floor((y+0.0005)*1000)/1000;
		printf("%0.3lf %0.3lf\n",x,y);
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:21: error: 'floor' was not declared in this scope
   28 |                 x = floor((x+0.0005)*1000)/1000;
      |                     ^~~~~
Language: C++

#include "iostream"
#include "iomanip"
using namespace std;

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

Compiler output:
a.cc:5:1: error: '::main' must return 'int'
    5 | double main()
      | ^~~~~~
Language: C++

#include <iostream>
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;}

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

#include<iostream>

using namespace std;



int main(){

	double a, b, c, d, e, f, x, y;
	double thousand = 1000.000;

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

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

	x = x * pow(10.0, 3.0);
	x += 0.5;
	x = (int)x;
	x = (double)x/thousand;

	y = y * pow(10.0, 3.0);
	y += 0.5;
	y = (int)y;
	y = (double)y/thousand;

	cout << x << " " << y << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: 'pow' was not declared in this scope
   17 |         x = x * pow(10.0, 3.0);
      |                 ^~~
Language: C++

#include<cstdio>
#include<cmath>
#include<algorithm>
#define rep(i,a,b) for(int i = (a); i<=(b); i++)
using namespace std;
const int num = 100;
double matrix[num][num + 1];   //邉サ謨ー遏ゥ髦オ?御サ?蠑?ァ?double ans[num];               //扈捺棡謨ー扈?
void exchange_col(int p1,int p2,int n)  //莠、謐「p1陦悟柱p2陦檎噪謇?怏謨ー謐ョ
{
    double t;
    int i;
    for(i = 0 ; i <= n ; i++)
        t = matrix[p1][i],matrix[p1][i] = matrix[p2][i],matrix[p2][i] = t;
}

bool gauss(int n)   //豎りァ」邉サ謨ー遏ゥ髦オ荳コn逧?コソ諤ァ譁ケ遞狗サ?{
    int i,j,k;
    int p;
    double r;

    for(i = 0 ; i < n - 1 ; i++)
    {
        p = i;
        for(j = i + 1 ; j < n ; j++)     //蟇サ謇セi蛻玲怙螟ァ蛟シ菴咲スョ
        {
            if(matrix[j][i] > matrix[p][i])
                p = j;
        }
        if(matrix[p][i] == 0) return false;
        if(p != i)     exchange_col(i,p,n);
        for(j = i + 1 ; j < n ; j++)         //蜑ゥ菴吝?霑幄。梧カ亥?
        {
            r = matrix[j][i] / matrix[i][i];
            for(k = i ; k <= n ; k++)
                matrix[j][k] -= r * matrix[i][k];
        }
    }
    for(i = n - 1 ; i >= 0 ; i--)     //闔キ蠕礼サ捺棡
    {
        ans[i] = matrix[i][n];
        for(j = n - 1 ; j > i ; j--)
            ans[i] -= matrix[i][j] * ans[j];
        ans[i] /= matrix[i][i];
    }
    return true;
}
int main()
{
    int i,j,t;
    while(scanf("%lf",&matrix[0][0])!=-1)
    {
        rep(i,1,2) scanf("%lf",&matrix[0][i]);
        rep(i,0,2) scanf("%lf",&matrix[1][i]);
        gauss(2);
        printf("%.3lf %.3lf\n",ans[0],ans[1]);
    }
    return 0;
}

Compiler output:
a.cc:17:5: error: expected initializer before 'int'
   17 |     int i,j,k;
      |     ^~~
a.cc:21:5: error: expected unqualified-id before 'for'
   21 |     for(i = 0 ; i < n - 1 ; i++)
      |     ^~~
a.cc:21:17: error: 'i' does not name a type
   21 |     for(i = 0 ; i < n - 1 ; i++)
      |                 ^
a.cc:21:29: error: 'i' does not name a type
   21 |     for(i = 0 ; i < n - 1 ; i++)
      |                             ^
a.cc:38:5: error: expected unqualified-id before 'for'
   38 |     for(i = n - 1 ; i >= 0 ; i--)     //闔キ蠕礼サ捺棡
      |     ^~~
a.cc:38:21: error: 'i' does not name a type
   38 |     for(i = n - 1 ; i >= 0 ; i--)     //闔キ蠕礼サ捺棡
      |                     ^
a.cc:38:30: error: 'i' does not name a type
   38 |     for(i = n - 1 ; i >= 0 ; i--)     //闔キ蠕礼サ捺棡
      |                              ^
a.cc:45:5: error: expected unqualified-id before 'return'
   45 |     return true;
      |     ^~~~~~
a.cc:46:1: error: expected declaration before '}' token
   46 | }
      | ^
a.cc: In function 'int main()':
a.cc:54:9: error: 'gauss' was not declared in this scope
   54 |         gauss(2);
      |         ^~~~~
a.cc:55:32: error: 'ans' was not declared in this scope; did you mean 'abs'?
   55 |         printf("%.3lf %.3lf\n",ans[0],ans[1]);
      |                                ^~~
      |                                abs
Language: C++

z = []
while True:
	try:
		a, b, c, d, e, f = map(float, raw_input().split())
		x = (c * e - b * f) / (a * e - d * b)
		y = (c * d - f * a) / (b * d - e * a)
		z.append([x, y])
	
	except:
		break
for i in z:
	print("{:.3f} {:.3f}".format(i[0] + 0, i[1] + 0))

Compiler output:
a.cc:1:1: error: 'z' does not name a type
    1 | z = []
      | ^
Language: C++

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

int main()
{
	double 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*10000%10>=5) x=x+0.001; 
		if(y*10000%10>=5) y=y+0.001; 
		printf("%.3lf %.3lf\n",x,y);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:27: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   13 |                 if(x*10000%10>=5) x=x+0.001;
      |                    ~~~~~~~^~~
      |                     |      |
      |                     double int
a.cc:14:27: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   14 |                 if(y*10000%10>=5) y=y+0.001;
      |                    ~~~~~~~^~~
      |                     |      |
      |                     double int
Language: C++

#include <iostream>

using namespace std;

int main() {
	double a, b, c, d, e, f, x, y, t;
	while(cin >> a >> b >> c >> d >> e >> f) {
		t = 1.0 / (a*e - b*d);
		x = (e*c - b*f) * t;
		y = (a*f - d*c) * t;
		cout << x << setprecision(3) << y << setprecision(3) << endl;
	}
	return 0;
}

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

#include <stdio.h>
#include<string>
#include<string.h>
#include <math.h>
#include<iostream>
#include <algorithm>
#include <map>
#include <vector>
#include <queue>
using namespace  std;


/*
//my header
#include "define.h"
#include "geometry.h"*/


void init()
{
#ifdef _WIN32
	freopen("1.txt", "r", stdin);
#endif
}

void func();

int main()
{
	init();
	func();

	return 0;
}
#define MyAbs(a) ((a)>0?(a):-(a))
#define MyEqualDoule(a,b) (MyAbs(a,b)<1e-6)

void func()
{
	double a,b,c,d,e,f, x, y;
	while(~scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f))
	{
		if(MyEqualDoule(a*e-b*d,0))
			x = 0;
		else
			x = (c*e-f*b)/(a*e - b*d);

		if(MyEqualDoule(b*d - a*e),0)
			y = 0;
		else
			y = (c*d-a*f)/(b*d - a*e);
		printf("%.3lf %.3lf\n", x, y);
	}
}

Compiler output:
a.cc:43:42: error: macro "MyAbs" passed 2 arguments, but takes just 1
   43 |                 if(MyEqualDoule(a*e-b*d,0))
      |                                          ^
a.cc:35:9: note: macro "MyAbs" defined here
   35 | #define MyAbs(a) ((a)>0?(a):-(a))
      |         ^~~~~
a.cc:48:42: error: macro "MyEqualDoule" requires 2 arguments, but only 1 given
   48 |                 if(MyEqualDoule(b*d - a*e),0)
      |                                          ^
a.cc:36:9: note: macro "MyEqualDoule" defined here
   36 | #define MyEqualDoule(a,b) (MyAbs(a,b)<1e-6)
      |         ^~~~~~~~~~~~
a.cc: In function 'void func()':
a.cc:36:28: error: 'MyAbs' was not declared in this scope
   36 | #define MyEqualDoule(a,b) (MyAbs(a,b)<1e-6)
      |                            ^~~~~
a.cc:43:20: note: in expansion of macro 'MyEqualDoule'
   43 |                 if(MyEqualDoule(a*e-b*d,0))
      |                    ^~~~~~~~~~~~
a.cc:48:20: error: 'MyEqualDoule' was not declared in this scope
   48 |                 if(MyEqualDoule(b*d - a*e),0)
      |                    ^~~~~~~~~~~~
Language: C++

#include <stdio.h>
#include<string>
#include<string.h>
#include <math.h>
#include<iostream>
#include <algorithm>
#include <map>
#include <vector>
#include <queue>
using namespace  std;


/*
//my header
#include "define.h"
#include "geometry.h"*/

#define MyAbs(a) ((a)>0?(a):-(a))
#define MyEqualDoule(a,b) (MyAbs(a-b)<1e-6)

void init()
{
#ifdef _WIN32
	freopen("1.txt", "r", stdin);
#endif
}

void func();

int main()
{
	init();
	func();

	return 0;
}


void func()
{
	double a,b,c,d,e,f, x, y;
	while(~scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f))
	{
		if(MyEqualDoule(a*e-b*d,0))
			x = 0;
		else
			x = (c*e-f*b)/(a*e - b*d);

		if(MyEqualDoule(b*d - a*e),0)
			y = 0;
		else
			y = (c*d-a*f)/(b*d - a*e);
		printf("%.3lf %.3lf\n", x, y);
	}
}

Compiler output:
a.cc:49:42: error: macro "MyEqualDoule" requires 2 arguments, but only 1 given
   49 |                 if(MyEqualDoule(b*d - a*e),0)
      |                                          ^
a.cc:19:9: note: macro "MyEqualDoule" defined here
   19 | #define MyEqualDoule(a,b) (MyAbs(a-b)<1e-6)
      |         ^~~~~~~~~~~~
a.cc: In function 'void func()':
a.cc:49:20: error: 'MyEqualDoule' was not declared in this scope
   49 |                 if(MyEqualDoule(b*d - a*e),0)
      |                    ^~~~~~~~~~~~
Language: C++

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

string toStr(int n);
string intToToStr(int n);

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

  while(cin >> a >> b >> c >> d >> e >> f) {
    a = a * 10000;
    b = b * 10000;
    c = c * 10000;
    d = d * 10000;
    e = e * 10000;
    f = f * 10000;
    
    int x, y;
    int det = a * e - b * d;

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

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

string toStr(int n) {
  int ipart = n / 10000;
  int fpart = (n - ipart * 10000) + 5;
  return intToString(ipart) + "." + intToString(fpart).substr(0, 3);
}

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

Compiler output:
a.cc: In function 'std::string toStr(int)':
a.cc:33:10: error: 'intToString' was not declared in this scope
   33 |   return intToString(ipart) + "." + intToString(fpart).substr(0, 3);
      |          ^~~~~~~~~~~
a.cc: In function 'std::string intToString(int)':
a.cc:37:17: error: expected initializer before 'ss'
   37 |   string stream ss;
      |                 ^~
a.cc:38:3: error: 'ss' was not declared in this scope
   38 |   ss << n;
      |   ^~
Language: C++

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

string toStr(int n);
string intToToString(int n);

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

  while(cin >> a >> b >> c >> d >> e >> f) {
    a = a * 10000;
    b = b * 10000;
    c = c * 10000;
    d = d * 10000;
    e = e * 10000;
    f = f * 10000;
    
    int x, y;
    int det = a * e - b * d;

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

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

string toStr(int n) {
  int ipart = n / 10000;
  int fpart = (n - ipart * 10000) + 5;
  return intToString(ipart) + "." + intToString(fpart).substr(0, 3);
}

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

Compiler output:
a.cc: In function 'std::string toStr(int)':
a.cc:33:10: error: 'intToString' was not declared in this scope; did you mean 'intToToString'?
   33 |   return intToString(ipart) + "." + intToString(fpart).substr(0, 3);
      |          ^~~~~~~~~~~
      |          intToToString
a.cc: In function 'std::string intToString(int)':
a.cc:39:13: error: cannot resolve overloaded function 'str' based on conversion to type 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   39 |   return ss.str;
      |             ^~~
Language: C++

#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) {
    a = a * 10000;
    b = b * 10000;
    c = c * 10000;
    d = d * 10000;
    e = e * 10000;
    f = f * 10000;
    
    int x, y;
    int det = a * e - b * d;

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

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

string toStr(int n) {
  int ipart = n / 10000;
  int fpart = (n - ipart * 10000) + 5;
  return intToString(ipart) + "." + intToString(fpart).substr(0, 3);
}

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

Compiler output:
a.cc: In function 'std::string intToString(int)':
a.cc:39:13: error: cannot resolve overloaded function 'str' based on conversion to type 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   39 |   return ss.str;
      |             ^~~
Language: C++

#include<iostream>
using namespace std;

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

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


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

int main()
{
    double a,b,c,d,e,f;
    double x,y;
    
    while(cin >> a >> b >> c >> d >> e >> f){
     if(b*d - a*e != 0)
         
         double tmp1 = (c*e - b*f),tmp2 = (a*e - b*d),tmp3 = (c*d - a*f),tmp4=(b*d - a*e);
        tmp1 = tmp1/tmp2;
        tmp2 = tmp3/tmp4;
        x = tmp1;
        y = tmp2;
         printf("%.3f %.3f",x,y);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'tmp1' was not declared in this scope; did you mean 'tm'?
   15 |         tmp1 = tmp1/tmp2;
      |         ^~~~
      |         tm
a.cc:15:21: error: 'tmp2' was not declared in this scope; did you mean 'tm'?
   15 |         tmp1 = tmp1/tmp2;
      |                     ^~~~
      |                     tm
a.cc:16:16: error: 'tmp3' was not declared in this scope; did you mean 'tm'?
   16 |         tmp2 = tmp3/tmp4;
      |                ^~~~
      |                tm
a.cc:16:21: error: 'tmp4' was not declared in this scope; did you mean 'tm'?
   16 |         tmp2 = tmp3/tmp4;
      |                     ^~~~
      |                     tm
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: 'setorecision' was not declared in this scope
   12 |     cout <<fixed<<setorecision(3)<<x<<" "<<y<<endl;
      |                   ^~~~~~~~~~~~
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
   int a,b,p,c,d,q;
   float x,y;
   while(cin >> a >> b >> c >> d >> e >> f)
   {
      x=(float)(d*p-b*q) / (a*d - b*c);
      y=(float)(a*q-c*p) / (a*d - b*c);
      x *= 1000;
      x +=0,5;
      x = (int)x;
      x /= 1000;
      y *= 1000;
      y +=0,5;
      y = (int)x;
      y /= 1000;
      printf("%.3f %.3f\n" ,x,y);
   }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:37: error: 'e' was not declared in this scope
    8 |    while(cin >> a >> b >> c >> d >> e >> f)
      |                                     ^
a.cc:8:42: error: 'f' was not declared in this scope
    8 |    while(cin >> a >> b >> c >> d >> e >> f)
      |                                          ^
Language: Java

import java.util.Arrays;
import java.util.Scanner;


public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner cin=new Scanner(System.in);
		int a,b;
		while(cin.hasNext()){
			a=cin.nextInt();
			b=cin.nextInt();
			System.out.printf("%d\n%d\n",GCD(a,b),LCM(a,b));
			
			
			
		}
	}
	int GCD(int a,int b){
		if(a<b){
			int temp=a;a=b;b=temp;
		}
		if(b==0) return a;
		return GCD(b,a%b);
	}
	int LCM(int a,int b){
		return a*b/GCD(a,b);
	}

}

Compiler output:
Main.java:17: error: non-static method GCD(int,int) cannot be referenced from a static context
			System.out.printf("%d\n%d\n",GCD(a,b),LCM(a,b));
			                             ^
Main.java:17: error: non-static method LCM(int,int) cannot be referenced from a static context
			System.out.printf("%d\n%d\n",GCD(a,b),LCM(a,b));
			                                      ^
2 errors
Language: Java

import java.util.*;

public class Main {
   public static void main(String[] args) {
       Scanner sc = new Scanner(System.in);
       while(scan.hasNext())
       {
      long a,b,a1,b1;
   a=sc.nextInt();
   b=sc.nextInt();
   a1=a;
   b1=b;
   if(b>a)
       {
       long tmp=b;
       b=a;
       a=tmp;
       }
   while(a%b!=0)
       {
       long tmp=b;
       b=a%b;
       a=tmp;
       }
   System.out.println(b+" "+((a1*b1)/b));
       }
   }
}

Compiler output:
Main.java:6: error: cannot find symbol
       while(scan.hasNext())
             ^
  symbol:   variable scan
  location: class Main
1 error
Language: Java

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a =scan.nextInt();
		int b =scan.nextInt();
		int gcd;
		if(a>b){
			gcd = gcd(a,b);
		}else{
			gcd = gcd(b, a);
		}
		int gld = a*b/gcd;
		System.out.println(gcd + " " + gld);
		scan.close();
	}

	private static int gcd(int m,int n){
		if(n==0){
			return m;
		}
		int o = n;
		n = m%n;
		m = o;
		if(m>n){
			return gcd(m,n);
		}else{
			return gcd(n,m);
		}
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
		Scanner scan = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner scan = new Scanner(System.in);
		                   ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

class Main {
	public static void main(String[] arg) throws NumberFormatException,
			IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		while (line != null) {
			String[] sl = line.split(" ");
			double a = Double.parseDouble(sl[0]);
			double b = Double.parseDouble(sl[1]);
			int gcd = getGCD(a, b);
			getLCM(a, b, gcd);
			line = br.readLine();
		}
	}

	private static void getLCM(double a, double b, int gcd) {
		double tmp = a / gcd * b;
		int tmp2 = (int) tmp;
		System.out.println(tmp2);
	}

	private static int getGCD(double a, double b) {
		List<Integer> ls = new ArrayList<>();
		int gcd = 0;
		for (int i = 1; i < a; i++) {
			if ((a % i) == 0)
				ls.add(i);
		}
		for (int i = 0; i < ls.size(); i++) {
			if ((b % ls.get(i)) == 0)
				gcd = ls.get(i);
		}
		System.out.println(gcd);
		return gcd;
	}
}

Compiler output:
Main.java:12: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                                           ^
  symbol:   class InputStreamReader
  location: class Main
1 error
Language: Java

package sample;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

class Main {
	public static void main(String[] arg) throws NumberFormatException,
			IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		ArrayList<Integer> ls = new ArrayList<Integer>();
		while (line != null) {
			String[] sl = line.split(" ");
			double a = Double.parseDouble(sl[0]);
			double b = Double.parseDouble(sl[1]);
			int gcd = getGCD(a, b, ls);
			getLCM(a, b, gcd);
			line = br.readLine();
		}
	}

	private static void getLCM(double a, double b, int gcd) {
		double tmp = a / gcd * b;
		int tmp2 = (int) tmp;
		System.out.println(tmp2);
	}

	private static int getGCD(double a, double b, ArrayList<Integer> ls) {
		int gcd = 0;
		for (int i = 1; i < a; i++) {
			if ((a % i) == 0)
				ls.add(i);
		}
		for (int i = 0; i < ls.size(); i++) {
			if ((b % ls.get(i)) == 0)
				gcd = ls.get(i);
		}
		System.out.println(gcd);
		ls.clear();
		return gcd;
	}
}

Compiler output:
Main.java:14: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                                           ^
  symbol:   class InputStreamReader
  location: class Main
1 error
Language: Java

import java.util.Scanner;

public class Solution {

    public static void main(String[] args)
    {
        Scanner ab = new Scanner(System.in);
        
		 while( ab.hasNext())
		 {
			 long n,x,y,a,b,c,p;
			 
			 a = ab.nextLong();
			 
			 x = a;
			 
			 b = ab.nextLong();
			 
			 y = b;
			 
			 
			 while( a!=0 )
			 {
			        c = a;
			        a = b % a;
			        b = c;
			 }
			 
			 p = (x*y)/b;
			 
			 System.out.printf("%d ",b);
			
			 System.out.println( p );
		 }
        
        
    }
}

       

Compiler output:
Main.java:3: error: class Solution is public, should be declared in a file named Solution.java
public class Solution {
       ^
1 error
Language: Java

import java.util.*;

class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
while(sc.hasNextInt()){
int a=sc.nextInt();
int b=sc.nextInt();
int c=gcd(a,b);
System.out.printf("%d %d%n",c,a*b/c);
}
}
int gcd(int x,inty){
int max=Math.max(x,y);
int min=Math.min(x,y);
if(max%min==0){return min;}
return gcd(min,max%min);
}
}

Compiler output:
Main.java:13: error: <identifier> expected
int gcd(int x,inty){
                  ^
1 error
Language: Java

import java.util.*;

class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
while(sc.hasNextInt()){
int a=sc.nextInt();
int b=sc.nextInt();
int c=gcd(a,b);
System.out.printf("%d %d%n",c,a*b/c);
}
}
public static int gcd(int x,inty){
int max=Math.max(x,y);
int min=Math.min(x,y);
if(max%min==0){return min;}
return gcd(min,max%min);
}
}

Compiler output:
Main.java:13: error: <identifier> expected
public static int gcd(int x,inty){
                                ^
1 error
Language: Java

import java.util.*;

class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
while(sc.hasNextInt()){
int a=sc.nextInt();
int b=sc.nextInt();
int c=gcd(a,b);
int d=a*b/c;
System.out.println(c+" "+d);
}
}
public static int gcd(int x,int y){
int max=Math.max(x,y);
int min=Math.min(x,y);
int amari=max%min
if(amari==0){return min;}
else{return gcd(min,amari);}
}
}

Compiler output:
Main.java:17: error: ';' expected
int amari=max%min
                 ^
1 error
Language: Java

import java.util.*;

class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
while(sc.hasNextLong()){
long a=sc.nextLong();
long b=sc.nextLong();
long c=gcd(a,b);
long d=(a*b)/c;
System.out.println(c+" "+d);
}
}
public static long gcd(int x,int y){
long max=Math.max(x,y);
long min=Math.min(x,y);
long amari=max%min;
if(amari==0){return min;}
else{return gcd(min,amari);}
}
}

Compiler output:
Main.java:9: error: incompatible types: possible lossy conversion from long to int
long c=gcd(a,b);
           ^
Main.java:19: error: incompatible types: possible lossy conversion from long to int
else{return gcd(min,amari);}
                ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
2 errors
Language: Java

import java.util.Scanner;

public class GCDandLCM {
	/**
	 * ???????????\????????£?????´??° a, b ?????\???????????¨??????a ??¨ b ????????§??¬?´???°??¨????°???¬?????°???????????????????????????????????°????????????????????????????????? ????????????a ??¨
	 * b ???????°???¬?????°??? 20 ???????¶??????????????????¨????????????
	 * 
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		Scanner sc = new Scanner(System.in);
		while (sc.hasNext()) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			System.out.println(greatestcommondivisor(a, b));
			System.out.println(leastcommonmultiple(a, b));
		}

	}

	/**
	 * ?????§??¬?´???°????????¨??????????????????
	 * 
	 * @param a
	 * @param b
	 */
	public static int greatestcommondivisor(int a, int b) {
		for (int i = b; 1 <= b; i--) {
			if (a % i == 0 && b % i == 0) {
				return i;
				// System.out.println(i);
			}
		}
		return b;
	}

	/**
	 * ????°???¬?????°????????¨??????????????????
	 * 
	 * @param a
	 * @param b
	 */
	public static int leastcommonmultiple(int a, int b) {
		// ?????° A , B ????????§??¬?´???°??? G ????°???¬?????°??? L ??¨????????¨
		// AB=GL???????????????????????????????????§???????????????
		int c = greatestcommondivisor(a, b);
		int d = a * b / c;
		return d;

	}

}

Compiler output:
Main.java:3: error: class GCDandLCM is public, should be declared in a file named GCDandLCM.java
public class GCDandLCM {
       ^
1 error