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

#include<iostream>
#include<string>

int main(void){
  int a, b;;
  int input_number
    std::cin>>input_number;
  std::cin>>a>>b;
  
  if(input_number=b/a){
    cout<<a+b<<endl;
  }if(input_number==b/a){
      cout<<a-b<<endl;
    }
    return0;
  }




Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: expected initializer before 'std'
    7 |     std::cin>>input_number;
      |     ^~~
a.cc:10:6: error: 'input_number' was not declared in this scope
   10 |   if(input_number=b/a){
      |      ^~~~~~~~~~~~
a.cc:11:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |     cout<<a+b<<endl;
      |     ^~~~
      |     std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |     cout<<a+b<<endl;
      |                ^~~~
      |                std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:12:7: error: 'input_number' was not declared in this scope
   12 |   }if(input_number==b/a){
      |       ^~~~~~~~~~~~
a.cc:13:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |       cout<<a-b<<endl;
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 |       cout<<a-b<<endl;
      |                  ^~~~
      |                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:15:5: error: 'return0' was not declared in this scope
   15 |     return0;
      |     ^~~~~~~
Language: C

#include<stdio.h>
int main(void){
  double a,b;
  scanf("%lf",&a);
  scanf("%lf",&b);
  if(b%a==0){
    printf("%lf",a+b);
  }
  else{
    printf("%lf",a-b);
  }
  return (0);
}


Compiler output:
main.c: In function 'main':
main.c:6:7: error: invalid operands to binary % (have 'double' and 'double')
    6 |   if(b%a==0){
      |       ^
Language: C

#include<stdio.h>
int main(void){
  double a,b;
  scanf("%d",&a);
  scanf("%d",&b);
  if(b%a==0){
    printf("%d",a+b);
  }
  else{
    printf("%d",a-b);
  }
  return (0);
}


Compiler output:
main.c: In function 'main':
main.c:6:7: error: invalid operands to binary % (have 'double' and 'double')
    6 |   if(b%a==0){
      |       ^
Language: C++

#include <bits/stdc+.h>
using namespace std;

int main() {
	int n, a[100001], min, num, tmp, hoge, zero[100001];
	cin >> n;
	num = n;
	for (int i = 0; i<n; i++)cin >> a[i];
	for (int i = 0; i<n - 1; i++) {
		//zero[i] = 0;
		for (int j = n - 1; j>i; j--) {
			if (a[j - 1]<a[j]) {
				tmp = a[j];
				a[j] = a[j - 1];
				a[j - 1] = tmp;
			}
		}
	}
	for (int i = 0; i<n; i++) {
		cout << a[i] << endl;
	}
	while (num > 1) {
		hoge = 0;
		num--;
		for (int i = 0; i<num; i++) {
			if (a[i] % a[num] == 0) {
				a[i] = 0;
				hoge++;
			}
			else {
				a[i] = a[i] % a[num];
			}
		}
		int j;
		for (int i = 1; i<=num+1; i++) {
			j = i;
			while(j>1&&(a[j]>a[j-1])) {
				if (a[j - 1]<a[j]) {
					tmp = a[j];
					a[j] = a[j - 1];
					a[j - 1] = tmp;
					j = j - 1;
				}
			}
		}
		num++;
		num = num - hoge;
	}
	cout << a[0] << endl;
}


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

#include <stdio.h>
int main(void){
  int A, B;
  
  scanf(%d%d, &A, &B);

  if(B % A == 0){
    printf("%d\n", A + B);
  }else{
    printf("%d\n", B - A);
  }
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:9: error: expected expression before '%' token
    5 |   scanf(%d%d, &A, &B);
      |         ^
Language: C

int main(){
  int A, B;
  
  scanf(%d%d, &A, &B);

  if(B % A == 0){
    printf("%d\n", A + B);
  }else{
    printf("%d\n", B - A);
  }
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |   scanf(%d%d, &A, &B);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(){
main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |   scanf(%d%d, &A, &B);
      |   ^~~~~
main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:9: error: expected expression before '%' token
    4 |   scanf(%d%d, &A, &B);
      |         ^
main.c:7:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    7 |     printf("%d\n", A + B);
      |     ^~~~~~
main.c:7:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:7:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:9:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    9 |     printf("%d\n", B - A);
      |     ^~~~~~
main.c:9:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

int main(){
  int A, B;
  
  scanf(%d%d, &A, &B)

  if(B % A == 0){
    printf("%d\n", A + B);
  }else{
    printf("%d\n", B - A);
  }
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |   scanf(%d%d, &A, &B)
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(){
main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |   scanf(%d%d, &A, &B)
      |   ^~~~~
main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:9: error: expected expression before '%' token
    4 |   scanf(%d%d, &A, &B)
      |         ^
main.c:4:22: error: expected ';' before 'if'
    4 |   scanf(%d%d, &A, &B)
      |                      ^
      |                      ;
    5 | 
    6 |   if(B % A == 0){
      |   ~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
  int a, b;;
  int input_number
  cin >> a >> b ;
 
  
  if(input_number=b/a){
    cout<<a+b<<endl;
  }if(input_number==b/a){
      cout<<a-b<<endl;
    }
    return0;
  }



Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected initializer before 'cin'
    7 |   cin >> a >> b ;
      |   ^~~
a.cc:10:6: error: 'input_number' was not declared in this scope
   10 |   if(input_number=b/a){
      |      ^~~~~~~~~~~~
a.cc:12:7: error: 'input_number' was not declared in this scope
   12 |   }if(input_number==b/a){
      |       ^~~~~~~~~~~~
a.cc:15:5: error: 'return0' was not declared in this scope
   15 |     return0;
      |     ^~~~~~~
Language: C++

#include <iostream>
#include<math.h>
using namespace std;
int main(void){
int a,b;
 if(b%a==0){
   cout<<("%d"a+b)<<endl;
 }else{cout<<("%d"b-a)<<endl;
}
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: unable to find string literal operator 'operator""a' with 'const char [3]', 'long unsigned int' arguments
    7 |    cout<<("%d"a+b)<<endl;
      |           ^~~~~
a.cc:8:15: error: unable to find string literal operator 'operator""b' with 'const char [3]', 'long unsigned int' arguments
    8 |  }else{cout<<("%d"b-a)<<endl;
      |               ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
 int x;
 cin >> x;
if (1 < x) {
 cout << 1 + 1 <<;
 }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: expected primary-expression before ';' token
    8 |  cout << 1 + 1 <<;
      |                  ^
Language: C++

#include <iostream>
#include<math.h>
using namespace std;
int main(void){
int a,b;
 if(b%a==0){
   cout<<("%d",a+b)<<endl;
 }else{cout<<"%d",b-a)<<endl;
}
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: expected ';' before ')' token
    8 |  }else{cout<<"%d",b-a)<<endl;
      |                      ^
      |                      ;
Language: C++

#include <iostream>
#include<math.h>
using namespace std;
int main(void){
int a,b;
 if(b%a==0){
   cout<<("%d"a+b)<<endl;
 }else{cout<<"%d"(b-a)<<endl;
}
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: unable to find string literal operator 'operator""a' with 'const char [3]', 'long unsigned int' arguments
    7 |    cout<<("%d"a+b)<<endl;
      |           ^~~~~
a.cc:8:18: error: expression cannot be used as a function
    8 |  }else{cout<<"%d"(b-a)<<endl;
      |              ~~~~^~~~~
Language: C

#include<stdio.h>
#include<math.h>
int main(void){
int a,b;
  if(b%a=0){
    printf(a+b);
  }else{printf(b-a);}
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: lvalue required as left operand of assignment
    5 |   if(b%a=0){
      |         ^
main.c:6:13: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
    6 |     printf(a+b);
      |            ~^~
      |             |
      |             int
In file included from main.c:1:
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:7:17: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
    7 |   }else{printf(b-a);}
      |                ~^~
      |                 |
      |                 int
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: Java

import java.util.*;
 
class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        if(a % b == 0){
          int result = a + b;
          System.out.println(result);
        }else(a % b != 0){
          int result = b - a;
          System.out.println(result);
        }
    }
}

Compiler output:
Main.java:11: error: not a statement
        }else(a % b != 0){
             ^
Main.java:11: error: ';' expected
        }else(a % b != 0){
                         ^
2 errors
Language: C++

#include <iostream>
#include<math.h>
using namespace std;
int main(void){
int a,b;
 if(b%a=0){
   cout<<(a+b)<<endl;
 }else{cout<<(b-a)<<endl;
}
}



Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: lvalue required as left operand of assignment
    6 |  if(b%a=0){
      |     ~^~
Language: Java

import java.util.*;
 
class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int result = 0;
        if(a % b == 0){
            result = a + b;
        }else(a % b != 0){
        	result = b - a;
        }
      
      	System.out.println(result);
    }
}

Compiler output:
Main.java:11: error: not a statement
        }else(a % b != 0){
             ^
Main.java:11: error: ';' expected
        }else(a % b != 0){
                         ^
2 errors
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
  int a, b;;
  int input_number
  cin >> a >> b ;
 
  
  if(input_number=b/a){
    cout<<a+b<<endl;
  if(input_number==b/a){
      cout<<a-b<<endl;
    }
    return0;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected initializer before 'cin'
    7 |   cin >> a >> b ;
      |   ^~~
a.cc:10:6: error: 'input_number' was not declared in this scope
   10 |   if(input_number=b/a){
      |      ^~~~~~~~~~~~
a.cc:15:5: error: 'return0' was not declared in this scope
   15 |     return0;
      |     ^~~~~~~
a.cc:16:4: error: expected '}' at end of input
   16 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <iostream>
using namespace std;
int main(void){
int a,b;
 if(a%b=0){
   cout<<(a+b)<<endl;
 }else{cout<<(b-a)<<endl;
}
}



Compiler output:
a.cc: In function 'int main()':
a.cc:5:6: error: lvalue required as left operand of assignment
    5 |  if(a%b=0){
      |     ~^~
Language: Java

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int result = 0;
        if(a % b == 0){
            result = a + b;
        }else{
        	result = b - a;
        }
      
      	System.out.println(result);
    }
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  << 4/12 ≦ 20 <<;
 

Compiler output:
a.cc:5:11: error: extended character ≦ is not valid in an identifier
    5 |   << 4/12 ≦ 20 <<;
      |           ^
a.cc: In function 'int main()':
a.cc:5:3: error: expected primary-expression before '<<' token
    5 |   << 4/12 ≦ 20 <<;
      |   ^~
a.cc:5:19: error: expected '}' at end of input
    5 |   << 4/12 ≦ 20 <<;
      |                   ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>
using namespace std;
int main(void){
int a,b;
 if(b%a=0){
   cout<<(a+b)<<endl;
 }else{cout<<(b-a)<<endl;
}
}



Compiler output:
a.cc: In function 'int main()':
a.cc:5:6: error: lvalue required as left operand of assignment
    5 |  if(b%a=0){
      |     ~^~
Language: C++

#include <iostream>
using namespace std;
int main(void){
int a,b,;
 if(b%a=0){
   cout<<(a+b)<<endl;
 }else{cout<<(b-a)<<endl;
}
}



Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: expected unqualified-id before ';' token
    4 | int a,b,;
      |         ^
a.cc:5:6: error: lvalue required as left operand of assignment
    5 |  if(b%a=0){
      |     ~^~
Language: C++

#include<stdio.h>

int main(void){
  int a,b;

printf("「11 22」の様に二つ数字を入力してください")
  scanf("%d %d",&a,&b);

  if(b%a == 0){
    printf("%d",a+b);
  }else{
    printf("%d",b-a);
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:52: error: expected ';' before 'scanf'
    6 | printf("「11 22」の様に二つ数字を入力してください")
      |                                                    ^
      |                                                    ;
    7 |   scanf("%d %d",&a,&b);
      |   ~~~~~
Language: C++

#include <iostream>
using namespace std;
int main(void){
int a,b,c,d;
 if(b%a=0){
   cout(a+b);
 }else{cout(a-b);
}
}



Compiler output:
a.cc: In function 'int main()':
a.cc:5:6: error: lvalue required as left operand of assignment
    5 |  if(b%a=0){
      |     ~^~
a.cc:6:8: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (int)'
    6 |    cout(a+b);
      |    ~~~~^~~~~
a.cc:7:12: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (int)'
    7 |  }else{cout(a-b);
      |        ~~~~^~~~~
Language: C++

#include <iostream>
using namespace std;
int main(void){
int a,b,c,d;
 if(b%a=0){
   printf(a+b);
 }else(a-b){}

}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:6: error: lvalue required as left operand of assignment
    5 |  if(b%a=0){
      |     ~^~
a.cc:6:12: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
    6 |    printf(a+b);
      |           ~^~
      |            |
      |            int
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
a.cc:7:12: error: expected ';' before '{' token
    7 |  }else(a-b){}
      |            ^
      |            ;
Language: C++

#include <iostream>
using namespace std;
int main(void){
int a,b,c,d;
 if(b%a=0){
   printf(a+b);
 }else{(a-b);}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:6: error: lvalue required as left operand of assignment
    5 |  if(b%a=0){
      |     ~^~
a.cc:6:12: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
    6 |    printf(a+b);
      |           ~^~
      |            |
      |            int
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C

#include<stdio.h>

int main(void){
  int a,b,c;
  scanf(%d,&a);
  scanf(%d,&b);
  if(b%a == 0){
    c = a + b;
  }else{
    c = b - a;
  }
  printf(%d,c);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: expected expression before '%' token
    5 |   scanf(%d,&a);
      |         ^
main.c:6:9: error: expected expression before '%' token
    6 |   scanf(%d,&b);
      |         ^
main.c:12:10: error: expected expression before '%' token
   12 |   printf(%d,c);
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    int a;
    int b;
  
    cout <<  ((a % b) >0) << endl;
  
  
  if(1){
    cout << "b - a" << endl;
  }
  if(0){
    cout << "b + a" << endl;
  }
}
    return 0;

Compiler output:
a.cc:17:5: error: expected unqualified-id before 'return'
   17 |     return 0;
      |     ^~~~~~
Language: C

include <stdio.h>

int main()
{
  int A, B;
  scanf("%d %d", &A, &B);
  int ans = ((B % A == 0) ? A + B : B - A);
  return 0;
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    int a;
    int b;
  
    cout <<  ((a % b) >0) << endl;
  
  
  if(1){
    cout << "b - a" << endl;
  }
  if(0){
    cout << "b + a" << endl;
  }
    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: expected '}' at end of input
   16 |     return 0;
      |              ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int a;
    int b;
  
    cout <<  ((a % b) >0) << endl;
  
  
  if(1){
    cout << "b - a" << endl;
  }
  if(0){
    cout << "b + a" << endl;
  }
    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:17:14: error: expected '}' at end of input
   17 |     return 0;
      |              ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C

include<stdio.h>

int main()
{
  int A, B;
  scanf("%d %d", &A, &B);
  int ans = ((B % A == 0) ? A + B : B - A);
  return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

include<stdio.h>

    int main()
{
  int A, B;
  scanf("%d %d", &A, &B);
  int ans = ((B % A == 0) ? A + B : B - A);
  printf("%d\n", ans);
  return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

include<stdio.h>

    int main()
{
  int A, B;
  scanf("%d %d", &A, &B);
  int ans = ((B % A == 0) ? A + B : B - A);
  printf("%d\n"ans);
  return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

include<stdio.h>

int main()
{
  int A, B;
  scanf("%d %d", &A, &B);
  int ans = (A % B) == 0 ? A + B : B - A;
  printf("%d\n"ans);
  return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

#include<stdio.h>
 
int main(){
  int 1 <= A <= 20;
  int 1 <= B <= 20;
  scanf("%d%d",&A, &B);
  if (A % B == 0) {
    printf("%d", A + B);
  } else {
    printf("%d", B - A);
  }
}

Compiler output:
main.c: In function 'main':
main.c:4:7: error: expected identifier or '(' before numeric constant
    4 |   int 1 <= A <= 20;
      |       ^
main.c:5:7: error: expected identifier or '(' before numeric constant
    5 |   int 1 <= B <= 20;
      |       ^
main.c:6:17: error: 'A' undeclared (first use in this function)
    6 |   scanf("%d%d",&A, &B);
      |                 ^
main.c:6:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:21: error: 'B' undeclared (first use in this function)
    6 |   scanf("%d%d",&A, &B);
      |                     ^
Language: C++

#include <iosream>
int main(){
	int a,b;
	std::cin>>a>>b;
	if(b%a==0)std::cout<<a+b;
	else std::cout<<b-a;
	return 0;
}


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

#include<stdio.h>
#include<stdlib.h>
 
int main(){
	
	int m, n, a[30], b[30], i, j, k, count, l, o, d;
	char c[200];
  
	scanf("%d %d", &n, &m);
	for(i=0;i<n;i++){
    	scanf("%s", c);
      	k=atoi(c);
    	for(j=0, count=0;count<k;j++){
    		if(c[j]==' '){
              a[count]=atoi(c+i);
              ++count
            }
        }
		if(i==0){
        	for(j=0;j<k;j++) b[j]=a[j];
          	o=k;
        	continue;
        }
    	for(j=0;a[j]!=0;j++){
        	for(l=0;b[l]!=0;l++){
            	if(a[j]==b[l]) break;
            }
          if(b[l]==0) a[j]=0;
        }
        for(j=0, d=0;j<count;j++){
        	if(a[j]!=0){
              b[d]=a[j];
              d++;
            }
        }    
          count=d;
          for(;d<o;++d) b[d]=0;
          o=d;
    }

      printf("%d", count);
      
      return 0;
    }
	
	
}

Compiler output:
main.c: In function 'main':
main.c:16:22: error: expected ';' before '}' token
   16 |               ++count
      |                      ^
      |                      ;
   17 |             }
      |             ~         
main.c: At top level:
main.c:47:1: error: expected identifier or '(' before '}' token
   47 | }
      | ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
  int a, b;
  cin >> a >> b ;
  cin >> input_nunber;
  
  if(input_number=b/a){
    cout<<a+b<<endl;
  if(input_number==b/a){
      cout<<a-b<<endl;
    }
    return0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'input_nunber' was not declared in this scope
    7 |   cin >> input_nunber;
      |          ^~~~~~~~~~~~
a.cc:9:6: error: 'input_number' was not declared in this scope
    9 |   if(input_number=b/a){
      |      ^~~~~~~~~~~~
a.cc:14:5: error: 'return0' was not declared in this scope
   14 |     return0;
      |     ^~~~~~~
a.cc:15:4: error: expected '}' at end of input
   15 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

include "bits/stdc++.h"
using namespace std;
 
int main(void) {
  int a, b;
  cin >> a >> b;
  cout << ( b%a==0? a+b : b-a ) << endl;
  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include "bits/stdc++.h"
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> a >> b;
      |   ^~~
a.cc:7:3: error: 'cout' was not declared in this scope
    7 |   cout << ( b%a==0? a+b : b-a ) << endl;
      |   ^~~~
a.cc:7:36: error: 'endl' was not declared in this scope
    7 |   cout << ( b%a==0? a+b : b-a ) << endl;
      |                                    ^~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int A,B;
  cin >> A >>B;
  
  int C=B%A;
  int D=0;
  if(C==0)  D=A+B;
  else D=B-A;
  cout << D << end1;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: 'end1' was not declared in this scope
   12 |   cout << D << end1;
      |                ^~~~
Language: C++

#include "../../bits/stdc++.h"
using namespace std;
 
int main(void) {
  int a, b;
  cin >> a >> b;
  cout << ( b%a==0? a+b : b-a ) << endl;
  return 0;
}

Compiler output:
a.cc:1:10: fatal error: ../../bits/stdc++.h: No such file or directory
    1 | #include "../../bits/stdc++.h"
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
#include<stdlib.h>
int main(){
  
  int A,B;
  int mod,ans;
  
  scanf("%d %d",&A,&B);
  
  C=B/A;
  
  if(mod==0)ans=B+A;
  else ans=B-A;
  
  printf("%d¥n",ans);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:3: error: 'C' undeclared (first use in this function)
   10 |   C=B/A;
      |   ^
main.c:10:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(void){
  int a, b;
  cin >> a >> b ;
  
  if(input_number==b/a){
    cout<<a+b<<endl;
  if(input_number!b/a){
      cout<<a-b<<endl;
    }
    return0;

Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: 'input_number' was not declared in this scope
    8 |   if(input_number==b/a){
      |      ^~~~~~~~~~~~
a.cc:10:18: error: expected ')' before '!' token
   10 |   if(input_number!b/a){
      |     ~            ^
      |                  )
a.cc:13:5: error: 'return0' was not declared in this scope
   13 |     return0;
      |     ^~~~~~~
a.cc:13:13: error: expected '}' at end of input
   13 |     return0;
      |             ^
a.cc:8:24: note: to match this '{'
    8 |   if(input_number==b/a){
      |                        ^
a.cc:13:13: error: expected '}' at end of input
   13 |     return0;
      |             ^
a.cc:4:15: note: to match this '{'
    4 | int main(void){
      |               ^
Language: C

#include<atdio.h>
int main(void)
{
  int A,B;
  scanf("%d%d",&A,&B);
  if(B%A==0){
    printf("%d",A+B);
  }
  else{
    printf("%d",A-B)
  }
  return 0;
}

Compiler output:
main.c:1:9: fatal error: atdio.h: No such file or directory
    1 | #include<atdio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
using namespace std;

int main(){
  int A,B;
  cin >> A >>B;
  
  int C=B%A;
  if(C==0) cout << A+B <<end1
  else cout << B-A <<end1;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: 'end1' was not declared in this scope
    9 |   if(C==0) cout << A+B <<end1
      |                          ^~~~
Language: C++

#include <iostream>
using namaespace std;

int main(){
  int A,B;
  cin >> A >>B;
  
  int C=B%A;
  if(C==0) cout << A+B <<end1
  else cout << B-A <<end1;
}


Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namaespace'
    2 | using namaespace std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> A >>B;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:12: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |   if(C==0) cout << A+B <<end1
      |            ^~~~
      |            std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:26: error: 'end1' was not declared in this scope
    9 |   if(C==0) cout << A+B <<end1
      |                          ^~~~
Language: C++

#include<iostream>
#include<string>

int main(void){
  int a,b;
  cin>>a>>b;
  
  if(input_number==a/b){
    cout<<a+b<<endl;
    else if(input_number!a/b){
      cout<<a-b<<endl;
    }
    return0;

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>a>>b;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:6: error: 'input_number' was not declared in this scope
    8 |   if(input_number==a/b){
      |      ^~~~~~~~~~~~
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout<<a+b<<endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |     cout<<a+b<<endl;
      |                ^~~~
      |                std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:10:5: error: expected '}' before 'else'
   10 |     else if(input_number!a/b){
      |     ^~~~
a.cc:8:24: note: to match this '{'
    8 |   if(input_number==a/b){
      |                        ^
a.cc:10:25: error: expected ')' before '!' token
   10 |     else if(input_number!a/b){
      |            ~            ^
      |                         )
a.cc:11:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |       cout<<a-b<<endl;
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |       cout<<a-b<<endl;
      |                  ^~~~
      |                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:13:5: error: 'return0' was not declared in this scope
   13 |     return0;
      |     ^~~~~~~
a.cc:13:13: error: expected '}' at end of input
   13 |     return0;
      |             ^
a.cc:4:15: note: to match this '{'
    4 | int main(void){
      |               ^
Language: C++

#include "bits/stdc++.h"
using namespace std;

int main(void) {
  int a, b;
  cin >> a >> b;
  cout << (b%a==0)? a+b : b-a << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:31: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    7 |   cout << (b%a==0)? a+b : b-a << endl;
      |                           ~~~~^~~~~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
using namespace std;

int main(){
    int n,m;

    int a[n][m];

    for (int i=0;i<m;i++)cin >> 

    if(b%a==0)cout << a+b << endl;
    else cout << a-b << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:5: error: expected primary-expression before 'if'
   25 |     if(b%a==0)cout << a+b << endl;
      |     ^~
a.cc:26:5: error: 'else' without a previous 'if'
   26 |     else cout << a-b << endl;
      |     ^~~~
a.cc:26:20: error: 'b' was not declared in this scope
   26 |     else cout << a-b << endl;
      |                    ^
Language: C++

#inclde <iostream>

using namaespace std;

int main(){
  int A,B;
  cin >> A >>B;
  
  int C=B%A;
  if(C==0) cout << A+B <<end1
  else cout << B-A <<end1;
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclde; did you mean #include?
    1 | #inclde <iostream>
      |  ^~~~~~
      |  include
a.cc:3:7: error: expected nested-name-specifier before 'namaespace'
    3 | using namaespace std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> A >>B;
      |   ^~~
a.cc:10:12: error: 'cout' was not declared in this scope
   10 |   if(C==0) cout << A+B <<end1
      |            ^~~~
a.cc:10:26: error: 'end1' was not declared in this scope
   10 |   if(C==0) cout << A+B <<end1
      |                          ^~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
using namespace std;

int main(){
    int n,m;

    int 

    cin >> n, m;

    if(b%a==0)cout << a+b << ednl;
    else cout << a-b << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:9: error: expected initializer before '>>' token
   23 |     cin >> n, m;
      |         ^~
a.cc:25:8: error: 'b' was not declared in this scope
   25 |     if(b%a==0)cout << a+b << ednl;
      |        ^
a.cc:25:10: error: 'a' was not declared in this scope
   25 |     if(b%a==0)cout << a+b << ednl;
      |          ^
a.cc:25:30: error: 'ednl' was not declared in this scope
   25 |     if(b%a==0)cout << a+b << ednl;
      |                              ^~~~
Language: C++

#include <>#include <bits/stdc++.h>
using namespace std;

int main (void) {
    int A, B;

    cin >> A >> B;

    if (B % A == 0) cout << A + B < endl;
    else cout << B - A << endl;

    return 0;
}

Compiler output:
a.cc:1:12: warning: extra tokens at end of #include directive
    1 | #include <>#include <bits/stdc++.h>
      |            ^
a.cc:1:10: error: empty filename in #include
    1 | #include <>#include <bits/stdc++.h>
      |          ^~
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin >> A >> B;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include <>#include <bits/stdc++.h>
a.cc:9:21: error: 'cout' was not declared in this scope
    9 |     if (B % A == 0) cout << A + B < endl;
      |                     ^~~~
a.cc:9:21: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:37: error: 'endl' was not declared in this scope
    9 |     if (B % A == 0) cout << A + B < endl;
      |                                     ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #include <>#include <bits/stdc++.h>
a.cc:10:10: error: 'cout' was not declared in this scope
   10 |     else cout << B - A << endl;
      |          ^~~~
a.cc:10:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:27: error: 'endl' was not declared in this scope
   10 |     else cout << B - A << endl;
      |                           ^~~~
a.cc:10:27: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: Java

public class Main {

	public static void main(String[] args) {
		final Scanner in = new Scanner(System.in);
		final int a = in.nextInt(), b = in.nextInt();
		if (isDivisor(a, b)) {
			System.out.println(a + b);
		} else {
			System.out.println(b - a);
		}

	}

	public static boolean isDivisor(int a, int b) {
		if (b % a == 0) return true;
		else return false;
	}
}

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

#include <stdio.h>

int main(void){
  int A,B;
  scanf("%d",&A);
  scanf("%d",&B);
  
  if(B % A == 0){
    printf("%d\n",A + B);
  }
  else (
    printf("%d\n",B - A);
    }
    return 0;
    }

Compiler output:
main.c: In function 'main':
main.c:12:25: error: expected ')' before ';' token
   12 |     printf("%d\n",B - A);
      |                         ^
      |                         )
main.c:11:8: note: to match this '('
   11 |   else (
      |        ^
main.c:12:26: error: expected ';' before '}' token
   12 |     printf("%d\n",B - A);
      |                          ^
      |                          ;
   13 |     }
      |     ~                     
main.c: At top level:
main.c:14:5: error: expected identifier or '(' before 'return'
   14 |     return 0;
      |     ^~~~~~
main.c:15:5: error: expected identifier or '(' before '}' token
   15 |     }
      |     ^
Language: C

#include <stdio.h>

int main()
{
   int smallA;
   int bigB;
   int calcResult;
   int s;

   s = scanf("%d %d", &smallA, &bigB);
   if (s == EOF)
   {
      printf("Error!\n");
   }

   if (bigB % smallA == 0)
   {
      calcResult = smallA + bigB;
   }
   else
   {
      calcResult = bigB - smallA;
   }

   print("%d", calcResult);

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:25:4: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   25 |    print("%d", calcResult);
      |    ^~~~~
      |    printf
Language: Java

import java.util.*;
import java.io.*;
public class Main{
  public static void main(String args[])
  {
    Scanner sc = new Scanner(System.in);
	int a,b;
    a = sc.nextInt();
    b = sc.nextInt();
 	if(b/a==0)
      System.out.println(a+b);
    else
      System.out.println(b-a);
  }
}
import java.util.*;

Compiler output:
Main.java:16: error: class, interface, enum, or record expected
import java.util.*;
^
1 error
Language: C++

#inclde <iostream>
#include<string>
using namaespace std;

int main(){
  int A,B;
  cin >> A >>B;
  
  int C=B%A;
  if(C==0) cout << A+B <<end1;
  else cout << B-A <<end1;
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclde; did you mean #include?
    1 | #inclde <iostream>
      |  ^~~~~~
      |  include
a.cc:3:7: error: expected nested-name-specifier before 'namaespace'
    3 | using namaespace std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> A >>B;
      |   ^~~
a.cc:10:12: error: 'cout' was not declared in this scope
   10 |   if(C==0) cout << A+B <<end1;
      |            ^~~~
a.cc:10:26: error: 'end1' was not declared in this scope
   10 |   if(C==0) cout << A+B <<end1;
      |                          ^~~~
a.cc:11:8: error: 'cout' was not declared in this scope
   11 |   else cout << B-A <<end1;
      |        ^~~~
a.cc:11:22: error: 'end1' was not declared in this scope
   11 |   else cout << B-A <<end1;
      |                      ^~~~
Language: Java

import java.util.*;
public class Main() {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    if(B%A==0) {
      System.out.println(A+B);
    }
    System.out.println(B-A);
  }
}

Compiler output:
Main.java:2: error: '{' expected
public class Main() {
                 ^
1 error
Language: C

#include <stdio.h>

int main()
{
   int smallA;
   int bigB;
   int calcResult;

   s = scanf("%d %d", &smallA, &bigB);
   if (s == EOF)
   {
      printf("Error!\n");
   }

   if (bigB % smallA == 0)
   {
      calcResult = smallA + bigB;
   }
   else
   {
      calcResult = bigB - smallA;
   }

   return calcResult;
}

Compiler output:
main.c: In function 'main':
main.c:9:4: error: 's' undeclared (first use in this function)
    9 |    s = scanf("%d %d", &smallA, &bigB);
      |    ^
main.c:9:4: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

import java.util.Scanner;
public class Main {

	
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int A = sc.nextInt();
    	int B = sc.nextInt();
    	if(B%A ==0)System.out.println(A+B);
    	else System.out.println(B-A)
	  
  }
  
}

Compiler output:
Main.java:10: error: ';' expected
    	else System.out.println(B-A)
    	                            ^
1 error
Language: C++

#include<iostream>

using namespace std;

void main()
{
  int a,b;
  cin >> a >> b;
  if(b % a == 0)
  {
    cout << a+b << endl;
  }
  else
  {
    cout << b-a << endl;
  }
}

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

import java.util.Scanner;
public class Main {

	
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int A = sc.nextInt();
    	int B = sc.nextInt();
    	if(B%A ==0)System.out.println(A+B);
    	else System.out.println(B-A);
	  
  }

Compiler output:
Main.java:12: error: reached end of file while parsing
  }
   ^
1 error
Language: Java

import java.util.Scanner;
public class Main {

	
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int A = sc.nextInt();
    	int B = sc.nextInt();
    	if(B%A ==0)System.out.println(A+B);
    	else System.out.println(B-A)
	  
  }

Compiler output:
Main.java:10: error: ';' expected
    	else System.out.println(B-A)
    	                            ^
Main.java:12: error: reached end of file while parsing
  }
   ^
2 errors
Language: Java

public class Main {
    public static void main(String[] args) {
        Scanner scnr = new Scanner(System.in);
      	int a = scnr.nextInt();
      	int b = scnr.nextInt();
      	if (b % a == 0) {
        	System.out,println(a + b);
        } else {
        	System.out,println(b - a;);
        }
    }
}

Compiler output:
Main.java:7: error: not a statement
        	System.out,println(a + b);
        	      ^
Main.java:7: error: ';' expected
        	System.out,println(a + b);
        	          ^
Main.java:9: error: not a statement
        	System.out,println(b - a;);
        	      ^
Main.java:9: error: ';' expected
        	System.out,println(b - a;);
        	          ^
Main.java:9: error: ')' or ',' expected
        	System.out,println(b - a;);
        	                        ^
Main.java:9: error: illegal start of expression
        	System.out,println(b - a;);
        	                         ^
6 errors
Language: Java

import java.Util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    
    if(a/b==0){
      System.out.println(a+b);
    }else{
      System.out.println(b-a);
    }
  }
}

Compiler output:
Main.java:1: error: package java.Util does not exist
import java.Util.*;
^
Main.java:5: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
                     ^
  symbol:   class Scanner
  location: class Main
3 errors
Language: Java

#include <iostream>
using namespace std;
int main() {
  int a, b;
  cin >> a;
  cin >> b;
  if (b % a == 0) {
    cout << a + b << endl;
  } else {
    cout << b - a << endl;
  }
}


Compiler output:
Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:1: error: class, interface, enum, or record expected
#include <iostream>
         ^
Main.java:5: error: not a statement
  cin >> a;
      ^
Main.java:6: error: not a statement
  cin >> b;
      ^
Main.java:8: error: not a statement
    cout << a + b << endl;
                  ^
Main.java:10: error: not a statement
    cout << b - a << endl;
                  ^
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
int main() {
^
  (use --enable-preview to enable unnamed classes)
7 errors
Language: C++

#include<iostream>
int main(){
  int a =0,b=0;
  cin >> a >> b;
  if(b%a==0){cout << a+b << endl;
            }else{
    cout << b-a << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin >> a >> b;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |   if(b%a==0){cout << a+b << endl;
      |              ^~~~
      |              std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:5:29: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 |   if(b%a==0){cout << a+b << endl;
      |                             ^~~~
      |                             std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:7:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |     cout << b-a << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |     cout << b-a << endl;
      |                    ^~~~
      |                    std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~