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

#include <stdio.h>
#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main(){
    int a, b;
    cin >> a >> b;
    cout << max(a + b, a - b, a * b) << endl;
}

Compiler output:
In file included from /usr/include/c++/14/string:51,
                 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:2:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:11:16:   required from here
   11 |     cout << max(a + b, a - b, a * b) << endl;
      |             ~~~^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: Java

import java.util.*;
public class Main {

	public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int []z = new int[3];
	int A = sc.nextInt();
	int B = sc.nextInt();
	z[0]=A+B;z[1]=A-B;z[2]=A*B;
	int max = z[0];
	for(int i=1;i<3;i++) {
    if(max<z[i]){
    	max = z[i];
    }		
	}
	System.out.println(max);	
	}

Compiler output:
Main.java:17: error: reached end of file while parsing
	}
	 ^
1 error
Language: C++

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

int main(void)
{
    int a,b;
    cin >> a >> b;
    cout << max(max(a + b,a - b),a * b)
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:40: error: expected ';' before 'return'
   12 |     cout << max(max(a + b,a - b),a * b)
      |                                        ^
      |                                        ;
   13 |     return 0;
      |     ~~~~~~
Language: C++

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

int main(){
    int a, b;
    cin a >> b;
    cout << max(a+b, max(a-b, a*b));
    return 0;
}

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

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

int main(){
  int A,tashi,hiki,kake,dekai,ans;
  cin >> A >> B;  
  tashi = A + B;
  hiki = A - B;
  kake = A * B;
  dekai = max({tashi,kake,hiki});
  cout << dekai <<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: 'B' was not declared in this scope
    9 |   cin >> A >> B;
      |               ^
Language: C++

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

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:6:12:   required from here
    6 |   cout<<max(a+b,a-b,a*b)<<endl;
      |         ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        
        int A = sc.nextInt();
        int B = sc.nextInt();
        int add = A + B;
        int sub = A - B;
        int mul = A * B; 
        int max;
        
        if(add >= sub && add >= mull){
            max = add;
        }else if(sub >= add && sub >= mul){
            max = sub;
        }else(mul >= add && muol >= sub){
            max = mul;
        }
        System.out.println(max);
    }
}
 

Compiler output:
Main.java:19: error: not a statement
        }else(mul >= add && muol >= sub){
             ^
Main.java:19: error: ';' expected
        }else(mul >= add && muol >= sub){
                                        ^
2 errors
Language: C++

// https://atcoder.jp/contests/abc098/tasks/abc098_a

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

int main()
{
  /* Magic word */
  cin.tie(0);
  ios::sync_with_stdio(false);
  /* ---------- */

  int a, b;

  cin >> a >> b;

  cout << max(a + b, a - b, a * b) << '\n';

  return 0;
}


Compiler output:
In file included from /usr/include/c++/14/string:51,
                 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:3:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:18:14:   required from here
   18 |   cout << max(a + b, a - b, a * b) << '\n';
      |           ~~~^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
  int a,b;cin>>a>>b;cout<<max(max(a+b,a-b),a*b)<<endl;

Compiler output:
a.cc:4:3: error: expected initializer before 'int'
    4 |   int a,b;cin>>a>>b;cout<<max(max(a+b,a-b),a*b)<<endl;
      |   ^~~
a.cc:4:11: error: 'cin' does not name a type
    4 |   int a,b;cin>>a>>b;cout<<max(max(a+b,a-b),a*b)<<endl;
      |           ^~~
a.cc:4:21: error: 'cout' does not name a type
    4 |   int a,b;cin>>a>>b;cout<<max(max(a+b,a-b),a*b)<<endl;
      |                     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  inta,b;
  cin>>a>>b;
  cout<<max(max(a+b,a-b),a*b)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'inta' was not declared in this scope; did you mean 'int'?
    4 |   inta,b;
      |   ^~~~
      |   int
a.cc:4:8: error: 'b' was not declared in this scope
    4 |   inta,b;
      |        ^
a.cc:5:8: error: 'a' 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;
  
  vector<int> c(3);
  c.at(0)=a+b;
  c.at(1)=a-b;
  c.at(2)=a*b:
  
  sort(c.begin(),c.end());
  cout <<c.at(3)<<endl;
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: found ':' in nested-name-specifier, expected '::'
   11 |   c.at(2)=a*b:
      |              ^
      |              ::
a.cc:11:13: error: 'b' is not a class, namespace, or enumeration
   11 |   c.at(2)=a*b:
      |             ^
Language: C++

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

int main(){
  int a,b;
  cin>>a>>b;
  int x,y,z,r;
  x=a+b;
  y=a-b;
  z=a*b;
  cout<<max({a+b,a-b,a*b})<<endl;​
            
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:34: error: '\U0000200b' was not declared in this scope
   11 |   cout<<max({a+b,a-b,a*b})<<endl;​
      |
Language: C++

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

int main(){
  int a,b;
  cin>>a>>b;
  cout<<max(a+b,max(a-b,a*c))<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:27: error: 'c' was not declared in this scope
    7 |   cout<<max(a+b,max(a-b,a*c))<<endl;
      |                           ^
Language: C++

#include"stdio.h"
int main()
{
	int a,b,max;
	char x;
	int add,minus,m;
	while(scanf("%d%d",&a,&b)!=EOF&&(a||b))
	{
	    x='+'
	max=add=a+b;
	minus=a-b;
	m=a*b;
	if(minus>max)
    {
		max=minus;
		x='-';
    }
	if(m>max)
    {
        x='×'
		max=m;
	printf("The largest among them is %d%c%d=%d.\n",a,x,b,max);
	}
	puts("0");
}

Compiler output:
a.cc:20:11: warning: multi-character character constant [-Wmultichar]
   20 |         x='×'
      |           ^~~
a.cc: In function 'int main()':
a.cc:9:18: error: expected ';' before 'max'
    9 |             x='+'
      |                  ^
      |                  ;
   10 |         max=add=a+b;
      |         ~~~       
a.cc:20:11: warning: overflow in conversion from 'int' to 'char' changes value from '50071' to '-105' [-Woverflow]
   20 |         x='×'
      |           ^~~
a.cc:20:14: error: expected ';' before 'max'
   20 |         x='×'
      |              ^
      |              ;
   21 |                 max=m;
      |                 ~~~
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:3:1: note: to match this '{'
    3 | {
      | ^
Language: C++

#include <iostream>
#include<vector>
#include<algorithm>
#include<string>
using namespace std;
#define REP(i,n) for(int i=0;i<n;i++)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define INF 1000000000
int main(){
cin.tie(0);
ios::sync_with_stdio(false);

	int A,B;
	cin>>A>>B;
	cout<<max(A+b,max(A-B,A*B))<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:21: error: 'b' was not declared in this scope
   15 |         cout<<max(A+b,max(A-B,A*B))<<endl;
      |                     ^
Language: C++

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

int main() {
   int a, b;
   cin >> a >> b;
   cout << max({a+b, a-b, a*b}) << endl;
 
   return 0;
}

Compiler output:
a.cc:2:20: error: expected ';' before ':' token
    2 | using namespace std:
      |                    ^
      |                    ;
a.cc:2:20: error: expected unqualified-id before ':' token
Language: C++

#include <stdio.h>
int main(){
  int a,b;
  scanf("%d %d",&a,&b);
  if(b<0){//引き算か掛け算
    if(a-b<a*b){
    printf("%d",a*b);
      return 0;
    }
    else{
      printf("%d"a-b);
      return 0;
    }
  }
  else{
    if(a+b<a*b){
     printf("%d",a*b);
      return 0;
    }
  else{
    printf("%d",a+b);
      return 0;
  }
  }
  return 0;
}
    
    


Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: unable to find string literal operator 'operator""a' with 'const char [3]', 'long unsigned int' arguments
   11 |       printf("%d"a-b);
      |              ^~~~~
Language: C++

#include <stdio.h>
int main(){
  int a,b;
  scanf("%d %d",&a,&b);
  if(b<0){//引き算か掛け算
    if(a-b<a*b){
    printf("%d",a*b);
      return 0;
    }
    else{
      printf("%d"a-b);
      return 0;
    }
  }
  else{
    if(a+b<a*b){
     printf("%d",a*b);
      return 0;
    }
  else{
    printf("%d",a+b);
      return 0;
  }
  return 0;
}
    
    


Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: unable to find string literal operator 'operator""a' with 'const char [3]', 'long unsigned int' arguments
   11 |       printf("%d"a-b);
      |              ^~~~~
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:2:11: note: to match this '{'
    2 | int main(){
      |           ^
Language: C++

#include <stdio.h>
int main(){
  int a,b;
  scanf("%d %d",&a,&b);
  if(b<0){//引き算か掛け算
    if(a-b<a*b){
    printf("%d",a*b);
      return 0;
    else{
      printf("%d"a-b);
      return 0;
    }
  }
  else{
    if(a+b<a*b){
     printf("%d",a*b);
      return 0;
  }
  else{
    printf("%d",a+b);
      return 0;
  }
  return 0;
}
    
    


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected '}' before 'else'
    9 |     else{
      |     ^~~~
a.cc:6:16: note: to match this '{'
    6 |     if(a-b<a*b){
      |                ^
a.cc:10:14: error: unable to find string literal operator 'operator""a' with 'const char [3]', 'long unsigned int' arguments
   10 |       printf("%d"a-b);
      |              ^~~~~
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:2:11: note: to match this '{'
    2 | int main(){
      |           ^
Language: C++

#include <stdio.h>
int main(){
  int a,b;
  scanf("%d %d",&a,&b);
  if(b<0){//引き算か掛け算
    if(a-b<a*b){
    printf("%d",a*b);
      return 0;
    else{
      printf("%d"a-b);
      return 0;
    }
  }
  else{
    if(a+b<a*b){
     printf("%d",a*b);
      return 0;
  }
  else{
    printf("%d",a+b);
      return 0;
  }
  
}
    
    


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected '}' before 'else'
    9 |     else{
      |     ^~~~
a.cc:6:16: note: to match this '{'
    6 |     if(a-b<a*b){
      |                ^
a.cc:10:14: error: unable to find string literal operator 'operator""a' with 'const char [3]', 'long unsigned int' arguments
   10 |       printf("%d"a-b);
      |              ^~~~~
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:2:11: note: to match this '{'
    2 | int main(){
      |           ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:21: error: expected ';' before 'return'
    6 |     printf("%d",a*b)
      |                     ^
      |                     ;
    7 |       return 0;
      |       ~~~~~~         
a.cc:10:22: error: expected ';' before 'return'
   10 |      printf("%d",a+b)
      |                      ^
      |                      ;
   11 |       return 0;
      |       ~~~~~~          
a.cc:14:21: error: expected ';' before 'return'
   14 |     printf("%d",a-b)
      |                     ^
      |                     ;
   15 |       return 0;
      |       ~~~~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define repi(i, a, b) for (long long i = (long long)(a); i < (long long)(b); i++)
#define pb push_back
#define all(x) (x).begin(), (x).end()

using namespace std;

int main()
{
    int a, b, sum, arg, seki;
    cin >> a >> b;
    sum = a + b;
    srg = a - b;
    seki = a * b;

    cout << max(sum, max(arg, seki)) << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: 'srg' was not declared in this scope; did you mean 'arg'?
   17 |     srg = a - b;
      |     ^~~
      |     arg
Language: C++

#include<bits/stdc++.h>
int main(){
int a,b;cin>>a>>b;
  cout<<max({a+b, a-b, a*b});
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    3 | int a,b;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:4:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    4 |   cout<<max({a+b, a-b, a*b});
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:4:9: error: 'max' was not declared in this scope; did you mean 'std::max'?
    4 |   cout<<max({a+b, a-b, a*b});
      |         ^~~
      |         std::max
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
Language: C

#include<stdio.h>

int main() {

	int a, b, i, j, fake;
	int c[3];

	scanf_s("%d %d", &a, &b);

	c[0] = a + b;
	c[1] = a - b;
	c[2] = a * b;

	for (i = 0; i < 3; i++) {
		for (j = 0; j < 2; j++) {
			if (c[j] < c[j + 1]) {
				fake = c[j];
				c[j] = c[j + 1];
				c[j + 1] = fake;
			}
		}
	}

	printf("%d", c[0]);

	return 0;

}

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

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

typedef long long int LL;
#define REP(n) for(LL i = 0; i < (n); i++)
#define COUT(val) cout << (val) << endl
#define CIN(val) cin >> (val)
#define SORT(vec) sort(vec.begin(), vec.end())
#define SORT_GRE(vec) sort(vec.begin(), vec.end(), greater<LL>())

int main(){
    int a, b;
    cin >> a >> b;
    int ans = max(a+b, a-b, a*b);
    cout <<  ans << endl;
    return 0;
}


Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:14:18:   required from here
   14 |     int ans = max(a+b, a-b, a*b);
      |               ~~~^~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: Java

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in);) {
            solve(sc);
        }
    }

    public static void solve(Scanner sc) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        int ans = Math.max(a + b, a - b);
        System.out.println(Math.max(anx, a * b));
    }
}

Compiler output:
Main.java:14: error: cannot find symbol
        System.out.println(Math.max(anx, a * b));
                                    ^
  symbol:   variable anx
  location: class Main
1 error
Language: C++

#include <algorithm>
#include <iomanip>
#include <iostream>
#include <limits>
#include <sstream>
#include <string>
#include <vector>

using namespace std;

#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, a, n) for (int i = a; i < n; i++)
#define all(a) (a).begin(), (a).end()
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define eps 1e-15

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
typedef tuple<int, int, int> ti3;

int main()
{
    int a, b:
    scanf("%d %d %d", &a, &b);
    int add = a + b;
    int sub = a - b;
    int mul = a * b;
    printf("%d\n", max(max(add, sub), mul));

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:13: error: found ':' in nested-name-specifier, expected '::'
   28 |     int a, b:
      |             ^
      |             ::
a.cc:28:12: error: 'b' has not been declared
   28 |     int a, b:
      |            ^
a.cc:29:10: error: qualified-id in declaration before '(' token
   29 |     scanf("%d %d %d", &a, &b);
      |          ^
a.cc:30:19: error: 'b' was not declared in this scope
   30 |     int add = a + b;
      |                   ^
Language: C++

#include <iostream>
#include<string>
#include<cmath>
#include<algorithm>
#include<cctype>
#include<stdio.h>
using namespace std;
int main(){
  int a,b;
    cin>>a>>b;
   /* int c,d,e;
    c=a+b;
    d=a-b;
    e=a*b;
    if(c<d){
        c=d;
    }
    if(c<e){
        c=e;
    }
    cout<<c<<endl;*/
    int mx=ma({a+b,a-b,a*b;})
    cout<<mx<<endl;




return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:27: error: expected '}' before ';' token
   22 |     int mx=ma({a+b,a-b,a*b;})
      |               ~           ^
a.cc:22:27: error: expected ')' before ';' token
   22 |     int mx=ma({a+b,a-b,a*b;})
      |              ~            ^
      |                           )
a.cc: At global scope:
a.cc:22:29: error: expected unqualified-id before ')' token
   22 |     int mx=ma({a+b,a-b,a*b;})
      |                             ^
a.cc:28:1: error: expected unqualified-id before 'return'
   28 | return 0;
      | ^~~~~~
a.cc:29:1: error: expected declaration before '}' token
   29 | }
      | ^
Language: C++

#include <cmath>
#include <iostream>

using namespace std;

int main() {
    int A, B;
    cin >> A >> B;
    cout << max({A + B, A - B, A * B}) << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    9 |     cout << max({A + B, A - B, A * B}) << endl;
      |             ~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/specfun.h:43,
                 from /usr/include/c++/14/cmath:3906,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

#include <iostream>

using namespace std;

int main() {
    int A, B;
    cin >> A >> B;
    cout << max({A + B, A - B, A * B}) << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    8 |     cout << max({A + B, A - B, A * B}) << endl;
      |             ~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 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/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

#include <iostream>
using namespace std;
int main() {
    int a=0,b=0,c=0,N,i;
    std::string S;
	cin >> N >> S;
    for( i = 0; i < N; i++){
     if( "W" == S[i]){
       a++; //西を向いてる人
     } else {
       b++; //東を向いている人
     }
   }
   if(a <= b){
    c = b - a;
   } else {
     c = a - b;
   }
  cout << c << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |      if( "W" == S[i]){
Language: C++

#include <iostream>
using namespace std;
int main() {
    int a=0,b=0,c=0,N,S,i;
	cin >> N >> S;
    for( i = 0; i < N; i++){
     if( "W" == S[i]){
       a++; //西を向いてる人
     } else {
       b++; //東を向いている人
     }
   }
   if(a <= b){
    c = b - a;
   } else {
     c = a - b;
   }
  cout << c << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: invalid types 'int[int]' for array subscript
    7 |      if( "W" == S[i]){
      |                  ^
Language: C++

#include <iostream>
using namespace std;
int main() {
    int a=0,b=0,c=0,N,S,i;
	cin >> N >> S;
  　for( i = 0; i < N; i++){
     if( "W" == S[i]){
       a++; //西を向いてる人
     } else {
       b++; //東を向いている人
     }
   }
   if(a <= b){
    c = b - a;
   } else {
     c = a - b;
   }
  cout << c << endl;
  return 0;
}

Compiler output:
a.cc:6:3: error: extended character 　 is not valid in an identifier
    6 |   　for( i = 0; i < N; i++){
      |   ^
a.cc: In function 'int main()':
a.cc:6:15: error: expected ')' before ';' token
    6 |   　for( i = 0; i < N; i++){
      |        ~      ^
      |               )
a.cc:6:27: error: expected ';' before ')' token
    6 |   　for( i = 0; i < N; i++){
      |                           ^
      |                           ;
Language: C

int max(int x, int y)
{
    if (x >= y) return x;
    else return y;
}

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 <stdio.h>
int main (){
int a,b,c,d,e;
 scanf ("%d%d",&a,&b);
  c=a+b;
  d=a-b
  e=a*b
 if (c<d||c<e){
   if(d>e){
 printf ("%d",d);
   }
  else{
  printf ("%d",e);
  }
 }
  else{
  printf ("%d",c);
  }
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:8: error: expected ';' before 'e'
    6 |   d=a-b
      |        ^
      |        ;
    7 |   e=a*b
      |   ~
Language: C++

#include<cstdio>
#include<algorithm>
int main(){
  int a,b,ans;
  scanf("%d %d",&a,&b);
  ans=max(a+b,a-b);
  ans=max(ans,a*b);
  printf("%d\n",ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: 'max' was not declared in this scope; did you mean 'std::max'?
    6 |   ans=max(a+b,a-b);
      |       ^~~
      |       std::max
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
Language: C

#include <stdio.h>
int main(){
int a,b;
scanf("%d %d",&a,&b);
int x,c,v;
x=a+b;
c=a-b;
v=a*b;

max=x;

if(c>max) max=c;
if(v>max) max=v;

printf("%d",max);

return 0;
}

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

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
  int a, b; cin >> a >> b;
  int maxa = max(a+b, a-b, a*b);
  cout << maxa << endl;
}

Compiler output:
In file included from /usr/include/c++/14/string:51,
                 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/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:7:17:   required from here
    7 |   int maxa = max(a+b, a-b, a*b);
      |              ~~~^~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
  int a, b; cin >> a >> b;
  int max = max(a+b, a-b, a*b);
  cout << max << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: 'max' cannot be used as a function
    7 |   int max = max(a+b, a-b, a*b);
      |             ~~~^~~~~~~~~~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
  int a, b; cin >> a >> b;
  int max = max({a+b, a-b, a*b});
  cout << max << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: 'max' cannot be used as a function
    7 |   int max = max({a+b, a-b, a*b});
      |             ~~~^~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
	long long a,b,x;
	cin>>a>>b;
	x=max({a*b,a+b,a-b});
	cout<<x<<333endl;
	return 0;
}

Compiler output:
a.cc:7:18: error: exponent has no digits
    7 |         cout<<x<<333endl;
      |                  ^~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main{
	long long a,b,x;
	cout>>x=max({a*b,a+b,a_b})>>endl;
	return 0;
}

Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main{
      |     ^~~~
a.cc:4:9: error: expected primary-expression before 'long'
    4 |         long long a,b,x;
      |         ^~~~
a.cc:4:9: error: expected '}' before 'long'
a.cc:3:9: note: to match this '{'
    3 | int main{
      |         ^
a.cc:5:9: error: 'cout' does not name a type
    5 |         cout>>x=max({a*b,a+b,a_b})>>endl;
      |         ^~~~
a.cc:5:34: error: expected unqualified-id before ')' token
    5 |         cout>>x=max({a*b,a+b,a_b})>>endl;
      |                                  ^
a.cc:6:9: error: expected unqualified-id before 'return'
    6 |         return 0;
      |         ^~~~~~
a.cc:7:1: error: expected declaration before '}' token
    7 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  
  int A,B;
  cin >> A,B;
  
  int sum = A + B;
  int mul = A * B;
  int sub = A - B;
   
  if ( B =< 0 && A >= 0)
    cout << sub;
  else if ( A > 1 && B > 1)
    cout << mul;
  else 
    cout << sum;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: expected primary-expression before '<' token
   13 |   if ( B =< 0 && A >= 0)
      |           ^
Language: C++

#include<iostream>
#include<cstdio>
#include<math.h>
#include<algorithm>

int main(){
    int A,B;
    scanf("%d%d",&A,&B);
    int c1,c2,c3;
    c1=A+B;
    c2=A-B;
    c3=A*B;
    int max=std::max(c1,c2,c3);
    std::cout<<max<<"\n";
    
    return 0;
}

Compiler output:
In file included from /usr/include/c++/14/string:51,
                 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/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:13:21:   required from here
   13 |     int max=std::max(c1,c2,c3);
      |             ~~~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<math.h>
#include<algorithm>

int main(){
    int A,B;
    scanf("%d%d",&A,&B);
    int c1,c2,c3;
    c1=A+B;
    c2=A-B;
    c3=A*B;
    std::cout<<std::max(c1,c2,c3)<<"\n";
    
    return 0;
}

Compiler output:
In file included from /usr/include/c++/14/string:51,
                 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/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:13:24:   required from here
   13 |     std::cout<<std::max(c1,c2,c3)<<"\n";
      |                ~~~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <iostream>
#include <algorighm>

using namespace std;

int main() {
  int A, B; cin>>A>>B;
  int ans = max(A+B, A-B);
  ans = max(ans, A*B);
  cout << ans << endl;
  return 0;
}
  

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

#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<vector> 
#include<limits>
#include<numeric>
#include<type_traits>
using namespace std;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define out(str) cout << str << endl

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int A,B,ans;

int main(){
    cin >> A >> B;
    out(max(A-B,A+B,A*B));
    return 0;
}

Compiler output:
In file included from /usr/include/c++/14/string:51,
                 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:3:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:22:5:   required from here
   22 |     out(max(A-B,A+B,A*B));
      |         ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <algorithm>
#include <iostream>

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

  int sum = A + B;
  int sub = A - B;
  int mul = A * B;
  int cal[3] = { sum, sub, mul };
  std::sort(cal, cal + 3, std::greater<int>);
  std::cout << cal[0] << std::endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:44: error: expected primary-expression before ')' token
   12 |   std::sort(cal, cal + 3, std::greater<int>);
      |                                            ^
Language: C++

int main(){

    int a, b, maxi=0;

    scanf("%d",&a);
    scanf("%d",&b);


    if((a+b>=a-b)&&(a+b>=a*b)){
        maxi=a+b;
    }
    else if((a-b>=a+b)&&(a-b>=a*b)){
        maxi=a-b;
    }
    else{
        maxi=a*b;
    }
        printf("%d", maxi);


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'scanf' was not declared in this scope
    5 |     scanf("%d",&a);
      |     ^~~~~
a.cc:18:9: error: 'printf' was not declared in this scope
   18 |         printf("%d", maxi);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
a.cc:18:28: error: expected '}' at end of input
   18 |         printf("%d", maxi);
      |                            ^
a.cc:1:11: note: to match this '{'
    1 | int main(){
      |           ^
Language: C

int main(){

    int a, b, maxi=0;

    scanf("%d",&a);
    scanf("%d",&b);


    if((a+b>=a-b)&&(a+b>=a*b)){
        maxi=a+b;
    }
    else if((a-b>=a+b)&&(a-b>=a*b)){
        maxi=a-b;
    }
    else{
        maxi=a*b;
    }
        printf("%d", maxi);


Compiler output:
main.c: In function 'main':
main.c:5:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    5 |     scanf("%d",&a);
      |     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(){
main.c:5:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    5 |     scanf("%d",&a);
      |     ^~~~~
main.c:5:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:18:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   18 |         printf("%d", maxi);
      |         ^~~~~~
main.c:18:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:18:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:18:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:18:9: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>

int main(){

    int a, b;

    scanf("%d",&a);
    scanf("%d",&b);

    int maxi=-1;

    if(a+b>maxi){
        maxi=a+b;
    }
    if(a-b>maxi){
        maxi=a-b;
    }
    if(a*b>m,,axi){
        maxi=a*b;
    }
        printf("%d", maxi);

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:18:12: error: 'm' undeclared (first use in this function)
   18 |     if(a*b>m,,axi){
      |            ^
main.c:18:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:14: error: expected expression before ',' token
   18 |     if(a*b>m,,axi){
      |              ^
main.c:18:15: error: 'axi' undeclared (first use in this function); did you mean 'maxi'?
   18 |     if(a*b>m,,axi){
      |               ^~~
      |               maxi
Language: C++

#include<stdio.h>

int main(){

    int a, b;

    scanf("%d",&a);
    scanf("%d",&b);

    int maxi=-1;

    if(a+b>maxi){
        maxi=a+b;
    }
    if(a-b>maxi){
        maxi=a-b;
    }
    if(a*b>m,,axi){
        maxi=a*b;
    }
        printf("%d", maxi);

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:12: error: 'm' was not declared in this scope
   18 |     if(a*b>m,,axi){
      |            ^
a.cc:18:14: error: expected primary-expression before ',' token
   18 |     if(a*b>m,,axi){
      |              ^
a.cc:18:15: error: 'axi' was not declared in this scope; did you mean 'maxi'?
   18 |     if(a*b>m,,axi){
      |               ^~~
      |               maxi
Language: C++

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

int main() {
	int a, b;
	cin >> a >> b;

	vector<int> vec(3);

	vec.at(0)=a+b;
	vec.at(1)=a-b;
	vec.at(2)=a*b;

	sort(vec.begin(),vec.end());

	cout << vec.at(0) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   15 |         sort(vec.begin(),vec.end());
      |         ^~~~
      |         short
Language: C++

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

int main() {
	int a, b;
	cin >> a >> b;

	vector<int> vec(3);

	vec.at(0)=a+b;
	vec.at(1)=a-b;
	vec.at(2)=a*b;

	sort(vec.begin,vec.end);

	cout << vec.at(0) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: no matching function for call to 'sort(<unresolved overloaded function type>, <unresolved overloaded function type>)'
   14 |         sort(vec.begin,vec.end);
      |         ~~~~^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:5: note:   template argument deduction/substitution failed:
a.cc:14:13: note:   couldn't deduce template parameter '_RAIter'
   14 |         sort(vec.begin,vec.end);
      |         ~~~~^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
 4793 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
  292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note:   candidate expects 4 arguments, 2 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note:   candidate expects 3 arguments, 2 provided
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:11:9: error: 'd' undeclared (first use in this function)
   11 |         d = a*b;
      |         ^
main.c:11:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:11:9: error: 'd' undeclared (first use in this function)
   11 |         d = a*b;
      |         ^
main.c:11:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:20: error: expected ')' before '{' token
   12 |         if(hasil< c{
      |           ~        ^
      |                    )
main.c:20:1: error: expected declaration or statement at end of input
   20 | }
      | ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:9:24: error: expected ')' before '{' token
    9 |         if(hasil< (a-b){
      |           ~            ^
      |                        )
main.c:17:1: error: expected declaration or statement at end of input
   17 | }
      | ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:11:24: error: expected ')' before '{' token
   11 |         if(hasil< (a-b){
      |           ~            ^
      |                        )
main.c:19:1: error: expected declaration or statement at end of input
   19 | }
      | ^
Language: C

#include <stdio.h>

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

 
    scanf("%d", &a);
    scanf("%d", &b);
    if(a<= -1000 && b<= 1000){
    	printf("Eror");
	}
	else{
	c = a + b;
    d = a - b;
    e = a * b;
    
	if((c>d) && (c>e))
	printf("%d",c);
	
	if((d>c) && (d>e))
	printf("%d",d);
	
	if((e>d) && (e>c))
	printf("%d",e);
	if((a==0) && (b==0))
	printf("%d",e);
	

Compiler output:
main.c: In function 'main':
main.c:26:9: error: expected declaration or statement at end of input
   26 |         printf("%d",e);
      |         ^~~~~~
main.c:26:9: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>

int main(){
    int a, b, valuePlus, valueMinus, valueProduct;
    printf("Masukkan Integer A :\n");
    scanf("%d", &a);
    printf("Masukkan Integer B :\n")
    scanf("%d", &b);

    valuePlus = a + b;
    valueMinus = a - b;
    valueProduct = a * b;

    if(a >= -1000 && a <= 1000 && b >= -1000 && b <= 1000){
       if(valuePlus > valueMinus && valuePlus > valueProduct){
            printf("The largest is %d\n", valuePlus);
        }else if(valueMinus > valuePlus && valueMinus > valueProduct){
            printf("The largest is %d\n", valueMinus);
        }else if(valueProduct > valuePlus && valueProduct > valueMinus){
            printf("The largest is %d\n", valueProduct);
        }
    }else{
        printf("Error\n");
    }

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:37: error: expected ';' before 'scanf'
    7 |     printf("Masukkan Integer B :\n")
      |                                     ^
      |                                     ;
    8 |     scanf("%d", &b);
      |     ~~~~~
Language: C

#include<stdio.h>
int main()
{
    int a, b, t, ku, ka;
    scanf("%d",&a);
    scanf("%d",&b);

    t=a+b;
    ku=a-b;
    ka=a*b;

    if (ka > t && ka > ku){
        printf("%d", ka);
        }
     else   if (ku > t && ku > ka){
            printf("%d", ku);
        }
     else   if (t > ku && t > ka){
            printf("%d", t);
        }
    else{
        printf("0");
    }

    return 0;

}0


Compiler output:
main.c:27:2: error: expected identifier or '(' before numeric constant
   27 | }0
      |  ^
Language: C++

#include <iostream>

using namespace std;

int main() {
        int a,b;
        cin>>a>>b;
        int ans=max({a+b,a-b,a*b});
        cout<<ans<<endl;
        return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    8 |         int ans=max({a+b,a-b,a*b});
      |                 ~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 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/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

#include <iostream>
using namespace std;

int main(void){
    int A, B;
    scanf("%d %d", &A, &B);
    
    // implements & output
    printf("%d\n", max({A*B, A-B, A+B}));
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    9 |     printf("%d\n", max({A*B, A-B, A+B}));
      |                    ~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 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/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided