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

#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<set>
#include<iomanip>
#define rep(i, a, n) for(int i = a; i < n; i++)
using namespace std;
int main(){
  int s, t;
  cin >> s >> t;
  if(b % a == 0) cout << a + b << "\n";
  else {
    cout << b - a << "\n";
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:6: error: 'b' was not declared in this scope
   12 |   if(b % a == 0) cout << a + b << "\n";
      |      ^
a.cc:12:10: error: 'a' was not declared in this scope
   12 |   if(b % a == 0) cout << a + b << "\n";
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  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:10:18: error: expected primary-expression before ',' token
   10 |     cout << b-a <, endl;
      |                  ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:7:11: error: expected '(' before 'printf'
    7 |   else if printf("%d",b-a);
      |           ^~~~~~
      |           (
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:6:9: error: lvalue required as left operand of assignment
    6 |   if(b/a=0) printf("%d",a+b);
      |         ^
main.c:7:11: error: expected '(' before 'printf'
    7 |   else if printf("%d",b-a);
      |           ^~~~~~
      |           (
Language: C++

#include<stdio.h>
#include<iostream>
#include<vector>
#include<math.h>
#include<queue>
#include<map>
#include<algorithm>
#include<string.h>
#include<functional>
#include<limits.h>
#include<stdlib.h>
#include<string>
#include<unordered_map>
using namespace std;
 
#define intmax INT_MAX
#define lmax LONG_MAX
#define uintmax UINT_MAX
#define ulmax ULONG_MAX
#define llmax LLONG_MAX
#define ll long long
#define rep(i,a,N) for((i)=(a);(i)<(N);(i)++)
#define rrp(i,N,a) for((i)=(N)-1;(i)>=(a);(i)--)
#define llfor ll i,j,k
#define sc(a) cin>>a
#define pr(a) cout<<a<<endl
#define pY puts("YES")
#define pN puts("NO")
#define py puts("Yes")
#define pn puts("No")
#define pnn printf("\n")
#define sort(a) sort(a.begin(),a.end())
#define push(a,b) (a).push_back(b)
#define llvec vector<vector<ll>>
#define charvec vector<vector<char>>
#define sizeoof(a,b) (a,vector<ll>(b))
#define llpvec vector<pair<ll,ll>>
/*繰り上げ除算*/ll cei(ll x,ll y){ll ans=x/y;if(x%y!=0)ans++;return ans;}
/*最大公約数*/ll gcd(ll x,ll y){return y?gcd(y,x%y):x;}
/*最小公倍数*/ll lcm(ll x,ll y){return x/gcd(x,y)*y;}
/*n乗*/ll llpow(ll x,ll n){ll i,ans=1;rep(i,0,n)ans*=x;return ans;}
/*階乗*/ll fact(ll x){ll i,ans=1;rep(i,0,x)ans*=(x-i);return ans;}
/*nCr*/ll ncr(ll n,ll r){return fact(n)/fact(r)/fact(n-r);}
/*nPr*/ll npr(ll n,ll r){return fact(n)/fact(n-r);}
/*primejudge*/bool prime(ll a){if(a<=1)return false;ll i;for(i=2;i*i<=a;i++){if(a%i==0)return false;}return true;}
ll ans=0;llfor;///////////////////////////////////////////////////////////
int main(){
  int A,B;
  cin A>>B;
  if(B%A==0) cout<<B-A;
  else cout<<A+B;
return 0;}


Compiler output:
a.cc: In function 'int main()':
a.cc:49:6: error: expected ';' before 'A'
   49 |   cin A>>B;
      |      ^~
      |      ;
Language: C

#include<stdio.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: In function 'main':
main.c:7:23: error: expected ';' before 'if'
    7 | scanf("%d %d", &a, &b)
      |                       ^
      |                       ;
    8 | 
    9 | if(b % a ==0)
      | ~~                     
main.c:12:1: error: 'else' without a previous 'if'
   12 | else
      | ^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i=0;i<(n);i++)
using namespace std;
using ll = long long;
using P = pair<int,int>;
 
 
int main() {
    int A;
    cin >> A;
    if(B%A==0) cout << A+B << endl;
    else cout << B-A << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: 'B' was not declared in this scope
   11 |     if(B%A==0) cout << A+B << endl;
      |        ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: expected primary-expression before '<<' token
    7 |   else << b - a << endl;
      |        ^~
Language: C

#include<stdio.h>

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


Compiler output:
main.c: In function 'main':
main.c:5:20: error: 'A' undeclared (first use in this function)
    5 |    scanf("%d %d", &A, &B);
      |                    ^
main.c:5:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:24: error: 'B' undeclared (first use in this function)
    5 |    scanf("%d %d", &A, &B);
      |                        ^
Language: C++

#include<iostream>
#include<algorithm>
#include<math.h>
#include<vector>
#include<map>
#include<set>

using namespace std;
using ll = long long;

const int MOD = 1e9 + 7;
const int INF = numeric_limits<int>::max();
const ll LLINF = numeric_limits<ll>::max();
const double PI = acos(-1.0);

#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, a, n) for (int i = a; i <= (n); ++i)

int main() {
    int A, B; cin >> A >> B;

    if (B % A == 0) cout << A + B << endl;
    else cout << B - A << endl;
    return 0;
}
#include<iostream>
#include<algorithm>
#include<math.h>
#include<vector>
#include<map>
#include<set>

using namespace std;
using ll = long long;

const int MOD = 1e9 + 7;
const int INF = numeric_limits<int>::max();
const ll LLINF = numeric_limits<ll>::max();
const double PI = acos(-1.0);

#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, a, n) for (int i = a; i <= (n); ++i)

int main() {
    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:36:11: error: redefinition of 'const int MOD'
   36 | const int MOD = 1e9 + 7;
      |           ^~~
a.cc:11:11: note: 'const int MOD' previously defined here
   11 | const int MOD = 1e9 + 7;
      |           ^~~
a.cc:37:11: error: redefinition of 'const int INF'
   37 | const int INF = numeric_limits<int>::max();
      |           ^~~
a.cc:12:11: note: 'const int INF' previously defined here
   12 | const int INF = numeric_limits<int>::max();
      |           ^~~
a.cc:38:10: error: redefinition of 'const ll LLINF'
   38 | const ll LLINF = numeric_limits<ll>::max();
      |          ^~~~~
a.cc:13:10: note: 'const ll LLINF' previously defined here
   13 | const ll LLINF = numeric_limits<ll>::max();
      |          ^~~~~
a.cc:39:14: error: redefinition of 'const double PI'
   39 | const double PI = acos(-1.0);
      |              ^~
a.cc:14:14: note: 'const double PI' previously defined here
   14 | const double PI = acos(-1.0);
      |              ^~
a.cc:44:5: error: redefinition of 'int main()'
   44 | int main() {
      |     ^~~~
a.cc:19:5: note: 'int main()' previously defined here
   19 | int main() {
      |     ^~~~
Language: C++

#include <iostream>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: 'out' was not declared in this scope
    9 |     else out << b-a;
      |          ^~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:9:9: error: lvalue required as left operand of assignment
    9 |   if(B%A=0)
      |         ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

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



Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: expected '}' before 'else'
   11 |     else cout<<A+B;
      |     ^~~~
a.cc:8:15: note: to match this '{'
    8 |     if(B%A!=0){
      |               ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

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



Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: expected ';' before 'else'
   10 |         else cout<<A-B
      |                       ^
      |                       ;
   11 |     else cout<<A+B;
      |     ~~~~               
a.cc:12:2: error: expected '}' at end of input
   12 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: expected primary-expression before ')' token
    9 |     if(B%A!=)cout<<A-B;
      |             ^
Language: C

#define _USE_MATH_DEFINES
#include <math.h>
#include <iostream>
#include <iomanip>
#include <cstdlib>
#include <algorithm>
#include <numeric>
#include <stdio.h>
#include <vector>

using namespace std;
typedef long long ll;

#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)

int main() {

    ll A,B;
    cin >> A >> B;
    ll out = B-A;
    if(B%A==0) out = A+B;
    cout << out << endl;
    return 0;
}


Compiler output:
main.c:3:10: fatal error: iostream: No such file or directory
    3 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

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

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

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        int A,B;
        if((B/A)==0){
            System.out.println(A + B);
        }else {
            System.out.println(B - A);
        }
    }
}


Compiler output:
Main.java:7: error: variable B might not have been initialized
        if((B/A)==0){
            ^
Main.java:7: error: variable A might not have been initialized
        if((B/A)==0){
              ^
2 errors
Language: Java

public class Main {

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

Compiler output:
Main.java:4: error: cannot find symbol
	     if (B%A==0){
	         ^
  symbol:   variable B
  location: class Main
Main.java:4: error: cannot find symbol
	     if (B%A==0){
	           ^
  symbol:   variable A
  location: class Main
Main.java:5: error: cannot find symbol
	         System.out.println(A + B);
	                            ^
  symbol:   variable A
  location: class Main
Main.java:5: error: cannot find symbol
	         System.out.println(A + B);
	                                ^
  symbol:   variable B
  location: class Main
Main.java:7: error: cannot find symbol
             System.out.println(B - A);
                                ^
  symbol:   variable B
  location: class Main
Main.java:7: error: cannot find symbol
             System.out.println(B - A);
                                    ^
  symbol:   variable A
  location: class Main
6 errors
Language: Java

package com.company;

public class Main {

    public static void main(String[] args) {
         int i;
	     if (i==(B/A)){
	         System.out.println(A + B);
         } else {
             System.out.println(B - A);
         }
    }
}

Compiler output:
Main.java:7: error: cannot find symbol
	     if (i==(B/A)){
	             ^
  symbol:   variable B
  location: class Main
Main.java:7: error: cannot find symbol
	     if (i==(B/A)){
	               ^
  symbol:   variable A
  location: class Main
Main.java:8: error: cannot find symbol
	         System.out.println(A + B);
	                            ^
  symbol:   variable A
  location: class Main
Main.java:8: error: cannot find symbol
	         System.out.println(A + B);
	                                ^
  symbol:   variable B
  location: class Main
Main.java:10: error: cannot find symbol
             System.out.println(B - A);
                                ^
  symbol:   variable B
  location: class Main
Main.java:10: error: cannot find symbol
             System.out.println(B - A);
                                    ^
  symbol:   variable A
  location: class Main
6 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define PI 3.14159265358979323846
constexpr int INF = numeric_limits<int>::max() / 2;
constexpr long long INFL = numeric_limits<long long>::max() / 2;
constexpr int MOD = 1000000007;
using Graph = vector<vector<int>>;



int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    int A,B;
    cin >> A >> B;
    if(B%!==0) cout << A+B << endl;
    else cout << B-A << endl;



}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:10: error: expected primary-expression before '!=' token
   18 |     if(B%!==0) cout << A+B << endl;
      |          ^~
a.cc:18:12: error: expected primary-expression before '=' token
   18 |     if(B%!==0) cout << A+B << endl;
      |            ^
Language: C++

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

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

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

import java.util.*;

public class a2 {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		scan.close();

		System.out.println(A % B == 0 ? A + B : A - B);
	}
}

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

int A;
int B;
if((B % A) == 0) {
	A + B;
}else{
  B - A;
}
  

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
int A;
^
  (use --enable-preview to enable unnamed classes)
Main.java:3: error: class, interface, enum, or record expected
if((B % A) == 0) {
^
Main.java:5: error: class, interface, enum, or record expected
}else{
^
Main.java:7: error: class, interface, enum, or record expected
}
^
4 errors
Language: C++

#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include<set>
#include<map>
using namespace std;


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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: invalid operands of types 'float' and 'float' to binary 'operator%'
   14 |     if(a%b == 0){
      |        ~^~
      |        | |
      |        | float
      |        float
Language: C++

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

int main() {
  int A, B;
  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:8:9: error: lvalue required as left operand of assignment
    8 |   if (B % A = 0) {
      |       ~~^~~
Language: C++

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

int main() {
  int y, x;
  cin >> y >> x;

  if (y % x = 0) {
    cout << "y + x" << endl;
  }
  else {
  cout << "y - x" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: lvalue required as left operand of assignment
    8 |   if (y % x = 0) {
      |       ~~^~~
a.cc:13:2: error: expected '}' at end of input
   13 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include<set>
#include<map>
using namespace std;


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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: invalid operands of types 'float' and 'float' to binary 'operator%'
   14 |     if(b%a == 0){
      |        ~^~
      |        | |
      |        | float
      |        float
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:6:11: error: lvalue required as left operand of assignment
    6 |     if(B%A=0)
      |           ^
Language: C++

#include <iostream>
using namespace std;
int main(){
	int n, a, b;
    cin >> n >> a >> b;
    int c =  int a* int n
    if(c > b){
    	cout << int c;
  	else{
    	cout << int b;
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: expected primary-expression before 'int'
    6 |     int c =  int a* int n
      |              ^~~
a.cc:11:6: error: expected '}' at end of input
   11 |     }
      |      ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <iostream>
using namespace std;
int main(){
	int n, a, b;
    cin >> n >> a >> b;
    int c =  int a* int n
    if(c > b){
    	cout << int c;
  	else{
    	cout << int b;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: expected primary-expression before 'int'
    6 |     int c =  int a* int n
      |              ^~~
a.cc:11:6: error: expected '}' at end of input
   11 |     }
      |      ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> A >> B;
      |   ^~~
a.cc:5:9: error: 'cout' was not declared in this scope
    5 |         cout << A+B;
      |         ^~~~
a.cc:8:17: error: 'cout' was not declared in this scope
    8 |                 cout << B-A;
      |                 ^~~~
Language: C++

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

int main() {
  int a,b;
  cin>>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:8:19: error: statement cannot resolve address of overloaded function
    8 |     cout<<a+b;endl;
      |                   ^
Language: C++

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

int main() {
  int a,b;
  cin>>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:8:19: error: expected ';' before '}' token
    8 |     cout<<a+b;endl
      |                   ^
      |                   ;
    9 |   }
      |   ~                
a.cc:9:3: error: statement cannot resolve address of overloaded function
    9 |   }
      |   ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: expected '}' before 'else'
    9 | else{
      | ^~~~
a.cc:7:16: note: to match this '{'
    7 | if (b % a == 0){
      |                ^
a.cc: At global scope:
a.cc:13:1: error: expected declaration before '}' token
   13 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define ll int64_t
#define all(v) v.begin(), v.end()
#define bitrep(n) for(int bit=0;bit<(1<<n);bit++)

int main() {
  int A,B
  cin >> A >> B;

  

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

  else if(A%B!=0) cout << A-B << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected initializer before 'cin'
   10 |   cin >> A >> B;
      |   ^~~
a.cc:14:8: error: 'B' was not declared in this scope
   14 |   if(A%B==0) cout << A+B << endl;
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define SORT(x) sort(x.begin(), x.end())
#define RS(x) rsort(x.begin(),x,end()))
#define REVE(x) reverse(x.begin(), x.end())
#define ALL(x) (x).begin(), (x).end()
int INF = 1e9 + 1;
int MOD = 1e9+7;
struct initon
{
    initon()
    {
        cin.tie(0);
        ios::sync_with_stdio(false);
    };
};
signed main()
{
    int a,b;
  cin >> a >> b;
   if(b%a==0){
  cout << b + a; 
   }else{
   cout << b - a;
   }
          }
        }
}

Compiler output:
a.cc:30:9: error: expected declaration before '}' token
   30 |         }
      |         ^
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

#include <iostream>

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:29: error: expected ';' before 'else'
    8 |   if(A%B==0) cout<<A+B<<endl
      |                             ^
      |                             ;
    9 |     else cout<<A-B<<endl;
      |     ~~~~
Language: C++

#include <iostream>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:29: error: expected ';' before 'else'
    8 |   if(A%B==0) cout<<A+B<<endl
      |                             ^
      |                             ;
    9 |     else cout<<A-B<<endl;
      |     ~~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: found ':' in nested-name-specifier, expected '::'
    5 |   int a,b:
      |          ^
      |          ::
a.cc:5:9: error: 'b' has not been declared
    5 |   int a,b:
      |         ^
a.cc:6:6: error: qualified-id in declaration before '>>' token
    6 |   cin>>a>>b;
      |      ^~
a.cc:7:6: error: 'b' was not declared in this scope
    7 |   if(b%a==0)cout<<b+a<<endl;
      |      ^
Language: C++

 #include<bits/stdc++.h>
 using namespace std;
int main(){
  int a, b;
  cin >> a >> b;
  int res = b - a;
  if (b % a == 0;) {
    res = b + a;
  }

  cout << res << "\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: expected primary-expression before ')' token
    7 |   if (b % a == 0;) {
      |                  ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b;
  cin>>a>>b;
  if(b%a==0)
    cout<<a+b;
  else
    cout<<b-a;

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: expected '}' at end of input
   10 |     cout<<b-a;
      |               ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'a' was not declared in this scope
    8 |    cout << a+b;
      |            ^
a.cc:8:14: error: 'b' was not declared in this scope
    8 |    cout << a+b;
      |              ^
a.cc:10:12: error: 'b' was not declared in this scope
   10 |     cout <<b-a;
      |            ^
a.cc:10:14: error: 'a' was not declared in this scope
   10 |     cout <<b-a;
      |              ^
Language: C++

#include <bits/stdc++.h>
#include <math.h>
#include <cmath>
 
using namespace std;
using std::cout;
using ll =long long;
bool is_int_lround(double x){
  return std::lround(x)==x;
}
int ketasuu(int x){
  int n=0;
  while(x>0){
    x /=10 ;
    n ++;
  }
  return n;
}
ll gcd11(ll x, ll y){
  long long a= max(x,y), b=min(x,y), c=a%b;
  while( c!=0){
    a =b;
    b =c;
    c = a%b;
  }
  return b;
}

int ab(int x, int y){
  if(x>=y){
    return x-y;
  }
  else if(y>x){
    return y-x;
  }
}
int main(){
  int A,B;
  if(B%A =0){
    cout<< A+B<<endl;
  }
  else{
    cout<< A-B<<endl;
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:7: error: lvalue required as left operand of assignment
   39 |   if(B%A =0){
      |      ~^~
a.cc: In function 'int ab(int, int)':
a.cc:36:1: warning: control reaches end of non-void function [-Wreturn-type]
   36 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int main() {
  int a, b;
  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:11:27: error: expected '}' at end of input
   11 |     cout << b - a << endl;
      |                           ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  ll a,b;
  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: 'll' was not declared in this scope
    4 |   ll a,b;
      |   ^~
a.cc:5:8: error: 'a' was not declared in this scope
    5 |   cin>>a>>b;
      |        ^
a.cc:5:11: error: 'b' was not declared in this scope
    5 |   cin>>a>>b;
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
 
  int a,b,;
  cin >> 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:11: error: expected unqualified-id before ';' token
    5 |   int a,b,;
      |           ^
Language: Java

public 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) {
            System.out.println(a + b);
        } else {
            System.out.println(a - b);
        }
    }
}

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

public class Main {
    
    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        System.out.println("キミとキミのパートナーの年齢を入力してね！");
        
        try {
            int a = br.read();
            int b = br.read();
            
            if(a%b == 0) {
                System.out.println(a + b);
            } else {
                System.out.println(a - b);
            }
        } catch (IOException e) {
            System.out.println("Partner is not found...why");
            e.printStackTrace();
        }
    }
}

Compiler output:
Main.java:4: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        ^
  symbol:   class BufferedReader
  location: class Main
Main.java:4: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                                ^
  symbol:   class BufferedReader
  location: class Main
Main.java:4: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                                                   ^
  symbol:   class InputStreamReader
  location: class Main
Main.java:16: error: cannot find symbol
        } catch (IOException e) {
                 ^
  symbol:   class IOException
  location: class Main
4 errors
Language: Java

    public static void main(int arg[]) {
        System.out.println("start test");
        //約数のとき
        int a = arg[0];
        int b = arg[1];
        int c = b / a;
        
        if(c == 0) {
            System.out.println(a + b);
        } else {
        //約数でない時
            System.out.println(b - a);
        }
    }

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
    public static void main(int arg[]) {
                  ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

package testCodes;

public class Abba {
    
    public static void main(int arg[]) {
        System.out.println("start test");
        //約数のとき
        int a = arg[0];
        int b = arg[1];
        int c = b / a;
        
        if(c == 0) {
            System.out.println(a + b);
        } else {
        //約数でない時
            System.out.println(b - a);
        }
    }
}


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:16: error: 'a' was not declared in this scope
    4 |         cin >> a >> b;
      |                ^
a.cc:4:21: error: 'b' was not declared in this scope
    4 |         cin >> a >> b;
      |                     ^
Language: C++

/*
このコード、と～おれ!
Be accepted!
∧＿∧　
（｡･ω･｡)つ━☆・*。
⊂　　 ノ 　　　・゜+.
　しーＪ　　　°。+ *´¨)
 　　　　　　　　　.· ´¸.·*´¨) ¸.·*¨)
		  　　　　　　　　　　(¸.·´ (¸.·'* ☆
					*/

#include <stdio.h>
#include <algorithm>
#include <string>
#include <cmath>
#include <cstring>
#include <vector>
#include <numeric>
#include <iostream>
#include <random>
#include <map>
#include <unordered_map>
#include <queue>
#include <regex>

#pragma GCC optimize("Ofast")
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define rep1(i, n) for(int i = 1; i <= (n); ++i)
#define rep2(i, n) for(int i = 2; i < (n); ++i)
#define repr(i, n) for(int i = n; i >= 0; --i)
#define reprm(i, n) for(int i = n - 1; i >= 0; --i)
#define printynl(a) printf(a ? "yes\n" : "no\n")
#define printyn(a) printf(a ? "Yes\n" : "No\n")
#define printYN(a) printf(a ? "YES\n" : "NO\n")
#define printin(a) printf(a ? "possible\n" : "inposible\n")
#define printdb(a) printf("%.50lf\n", a)//少数出力
#define printdbd(a) printf("%.16lf\n", a)//少数出力(桁少なめ)
#define prints(s) printf("%s\n", s.c_str())//string出力
#define all(x) (x).begin(), (x).end()
#define allsum(a, b, c) ((a + b) * c / 2)//等差数列の和、初項,末項,項数
#define pb push_back
#define priq priority_queue
#define rpriq priq<int, vector<int>, greater<int>>
#define deg_to_rad(deg) (((deg)/360.0)*2.0*PI)
#define rad_to_deg(rad) (((rad)/2.0/PI)*360.0)
#define Please return
#define AC 0

using ll = long long;

constexpr int INF = 1073741823;
constexpr int MINF = -1073741823;
constexpr ll LINF = ll(4661686018427387903);
constexpr ll MOD = 1000000007;
const double PI = acos(-1);

using namespace std;

void scans(string& str) {
	char c;
	str = "";
	scanf("%c", &c);
	if (c == '\n')scanf("%c", &c);//最初の改行対策
	while (c != '\n' && c != -1) {
		str += c;
		scanf("%c", &c);
	}
}

void scanc(char& str) {
	char c;
	scanf("%c", &c);
	if (c == -1)return;
	while (c == '\n') {
		scanf("%c", &c);
	}
	str = c;
}

double acot(double x) {
	return PI / 2 - atan(x);
}

/*-----------------------------------------ここからコード-----------------------------------------*/


int main() {
	
	int n, m;
	scanf("%d%d", &n, &m);
	printf("%d\n", m % n == 0 ? a + b : a - b);
	
	Please AC;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:91:37: error: 'a' was not declared in this scope
   91 |         printf("%d\n", m % n == 0 ? a + b : a - b);
      |                                     ^
a.cc:91:41: error: 'b' was not declared in this scope
   91 |         printf("%d\n", m % n == 0 ? a + b : a - b);
      |                                         ^
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(A%B==0) System.out.println(A+B);
   else System.out.println(A-B)
 }
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
	int a,b,c;
    char d,e;
  	cin>>a>>b>;
  if(b%a==0)
  cout<<a+b<<endl;
  else
    cout<<b-a<<endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: expected primary-expression before ';' token
    7 |         cin>>a>>b>;
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
	int a,b,c;
    char d,e;
  	cin>>a>>b>;
  if(b%a==0)
  cout<<a+b<<endl;
  else
    cout<<b-a"<<endl;
  
  return 0;
}

Compiler output:
a.cc:11:14: warning: missing terminating " character
   11 |     cout<<b-a"<<endl;
      |              ^
a.cc:11:14: error: missing terminating " character
   11 |     cout<<b-a"<<endl;
      |              ^~~~~~~~
a.cc: In function 'int main()':
a.cc:7:19: error: expected primary-expression before ';' token
    7 |         cin>>a>>b>;
      |                   ^
a.cc:11:14: error: expected ';' before 'return'
   11 |     cout<<b-a"<<endl;
      |              ^
      |              ;
   12 | 
   13 |   return 0;
      |   ~~~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,m,n) for(int i=m; i<n; i++)
#define co(n) cout << n << endl
using namespace std;
int main(){
  double a, b;
  cin >> a >> b;
  if(a%b==0) co(a+b);
  else co(b-a);
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: invalid operands of types 'double' and 'double' to binary 'operator%'
    8 |   if(a%b==0) co(a+b);
      |      ~^~
      |      | |
      |      | double
      |      double
Language: C++

#include<iostream>
using namespace std;
int main(){
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: In function 'int main()':
a.cc:14:14: error: expected '}' at end of input
   14 |     return 0;
      |              ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <iostream>

using namespace std;


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

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: lvalue required as left operand of assignment
    9 |     if(b%a=0){
      |        ~^~
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);
    } else {
      System.out.println(B - A);
    }
  }
}

Compiler output:
Main.java:9: error: cannot find symbol
    if (b % a == 0) {
        ^
  symbol:   variable b
  location: class Main
Main.java:9: error: cannot find symbol
    if (b % a == 0) {
            ^
  symbol:   variable a
  location: class Main
2 errors
Language: C++

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

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

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

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



Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 'rndl' was not declared in this scope
    7 |     cout <<a+b<<rndl;
      |                 ^~~~
Language: C++

#include<bits/stdc++.h>

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



Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> a>>b;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:7:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |     cout <<a+b<<rndl;
      |     ^~~~
      |     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:17: error: 'rndl' was not declared in this scope
    7 |     cout <<a+b<<rndl;
      |                 ^~~~
a.cc:10:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |     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:10:19: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |     cout << b-a<< endl;
      |                   ^~~~
      |                   std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C

#include<stdio.h>
int main()
{
	int a, b, c;
	scanf_s("%d%d", &a, &b);
	c = b % a == 0 ? a + b : b - a;
	printf("%d", c);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    5 |         scanf_s("%d%d", &a, &b);
      |         ^~~~~~~
      |         scanf
Language: C++

#include<stdio.h>
int main()
{
	int a, b, c;
	scanf_s("%d%d", &a, &b);
	c = b % a == 0 ? a + b : b - a;
	printf("%d", c);
	return 0;
}

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

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

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

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

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

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

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

int main() {
  int a,b;
  cin >> 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:7:8: error: 'B' was not declared in this scope
    7 |   if(a%B==0){
      |        ^
Language: C++

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

        sc.close();
    }
}

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++

from sys import stdin, exit

input = stdin.readline
lmi = lambda: list(map(int, input().split()))
mi = lambda: map(int, input().split())
si = lambda: input().strip('\n')
ssi = lambda: input().strip('\n').split()

a, b = mi()
if b / a % 1 == 0:
    print(a+b)
else:
    print(b-a)


Compiler output:
a.cc:1:1: error: 'from' does not name a type
    1 | from sys import stdin, exit
      | ^~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    9 |     else cout<<abs(a-b<<endl;
      |                    ~~~^~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    8 |     else cout<<abs(a-b<<endl;
      |                    ~~~^~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
  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:14:2: error: expected class-name at end of input
   14 | ~
      |  ^
Language: C++

include <bits/stdc++.h>

using namespace std;

int main(){
  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:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> a>> b;
      |   ^~~
a.cc:9:5: error: 'cout' was not declared in this scope
    9 |     cout << (a+b)<< endl;
      |     ^~~~
a.cc:9:21: error: 'endl' was not declared in this scope
    9 |     cout << (a+b)<< endl;
      |                     ^~~~
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout << (b - a) << endl;
      |     ^~~~
a.cc:11:24: error: 'endl' was not declared in this scope
   11 |     cout << (b - a) << endl;
      |                        ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int (i) = 0; (i) < (n); ++(i))
#define rrep(i,n) for(int (i) = (n) - 1; (i) >= 0; --(i)) //Reversi rep
#define nfor(i,a,b) for(int (i) = (a); (i) < (b); ++(i)) //Natural for
#define rfor(i,a,b) for(int (i) = (b); (i) >= (a); --(i)) //Reversi for
#define mod (1000000007)
#define YES cout << "YES" << endl;
#define Yes cout << "Yes" << endl;
#define NO cout << "NO" << endl;
#define No cout << "No" << endl;

int asc(const void *a, const void *b) {
    return *(int *)a - *(int *)b;
}

int desc(const void *a, const void *b) {
    return *(int *)b - *(int *)a;
}

int main()
{
    double a,b;
    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:25:10: error: invalid operands of types 'double' and 'double' to binary 'operator%'
   25 |     if (b%a == 0) {
      |         ~^~
      |         | |
      |         | double
      |         double
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int main() {
    int A, B, ans;
    cin >> A >> B;
    if (B%A == 0) ans = A+B
    else ans = B-A;
    cout << ans << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:11: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    5 |   int main() {
      |           ^~
a.cc:5:11: note: remove parentheses to default-initialize a variable
    5 |   int main() {
      |           ^~
      |           --
a.cc:5:11: note: or replace parentheses with braces to value-initialize a variable
a.cc:5:14: error: a function-definition is not allowed here before '{' token
    5 |   int main() {
      |              ^
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:6:14: error: expected '}' before 'else'
    6 |              else{printf("%d",b-a);}
      |              ^~~~
Language: C++


void ABC118A()
{
	int A, B;
	cin >> A >> B;
	if (B%A == 0)
		cout << A + B << endl;
	else
		cout << B - A << endl;
}
int main()
{
	ABC118A();
	return 0;
}

Compiler output:
a.cc: In function 'void ABC118A()':
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |         cin >> A >> B;
      |         ^~~
a.cc:7:17: error: 'cout' was not declared in this scope
    7 |                 cout << A + B << endl;
      |                 ^~~~
a.cc:7:34: error: 'endl' was not declared in this scope
    7 |                 cout << A + B << endl;
      |                                  ^~~~
a.cc:9:17: error: 'cout' was not declared in this scope
    9 |                 cout << B - A << endl;
      |                 ^~~~
a.cc:9:34: error: 'endl' was not declared in this scope
    9 |                 cout << B - A << endl;
      |                                  ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
signed main(){
 double a,b;
  cin>>a>>b;
  if(b%a==0){
    cout<<a+b<<"\n";
  }else{
    cout<<b-a<<"\n";
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: invalid operands of types 'double' and 'double' to binary 'operator%'
    6 |   if(b%a==0){
      |      ~^~
      |      | |
      |      | double
      |      double
Language: C++

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




Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
using namespace std;
int main() {
  int A;
  int B;
  int sum;
  int sub;
  cout<<"Enter Two Numbers = ";
  cin>>A>>B;
  sum = A + B;
  sub = B - A;
  if(A % B) {
    cout<<sum;
  }
  else (cout<<sub)
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:19: error: expected ';' before '}' token
   15 |   else (cout<<sub)
      |                   ^
      |                   ;
   16 | }
      | ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b;
  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:6:19: error: expected primary-expression before ';' token
    6 |   cin >> a >> b >>;
      |                   ^