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

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

Compiler output:
main.c: In function 'main':
main.c:12:9: error: expected declaration or statement at end of input
   12 |         return 0;
      |         ^~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected ',' or ';' before 'cin'
    6 |   cin >> a >> b;
      |   ^~~
a.cc:10:28: error: invalid operands of types 'const int' and '<unresolved overloaded function type>' to binary 'operator<<'
   10 |   cout << max(c,(max(d,e)) << endl;
      |                 ~~~~~~~~~~~^~~~~~~
Language: C++

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

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

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

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
using P = pair<int,int>;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: redeclaration of 'int ans'
    9 |   int ans = max(ans, a * b);
      |       ^~~
a.cc:8:7: note: 'int ans' previously declared here
    8 |   int ans = max(a+b, a-b);
      |       ^~~
Language: C

#include <stdio.h>
#define MAX(x,y)	((x)>(y)?(x):(y))
#define MAX3(x,y,z)	((x)>(MAX(y,z)) ? (x):(MAX(y,z)))
int main(){
  int a, b;
  scanf("%d%d", &a, &b);
  printf("%d", MAX( a+b, a-b, a*b ));
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:35: error: macro "MAX" passed 3 arguments, but takes just 2
    7 |   printf("%d", MAX( a+b, a-b, a*b ));
      |                                   ^
main.c:2:9: note: macro "MAX" defined here
    2 | #define MAX(x,y)        ((x)>(y)?(x):(y))
      |         ^~~
main.c:7:16: error: 'MAX' undeclared (first use in this function)
    7 |   printf("%d", MAX( a+b, a-b, a*b ));
      |                ^~~
main.c:7:16: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream>

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: lvalue required as left operand of assignment
   13 |     }else if (a + b = a - b){
      |               ~~^~~
a.cc:17:17: error: lvalue required as left operand of assignment
   17 |     }else if (a - b = a * b){
      |               ~~^~~
Language: C++

#include <iostream>

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: lvalue required as left operand of assignment
   13 |     }else if (a + b = a - b){
      |               ~~^~~
a.cc:17:17: error: lvalue required as left operand of assignment
   17 |     }else if (a - b = a * b){
      |               ~~^~~
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    7 |   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: Java

import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
	Scanner scan=new Scanner(System.in);
	int A=scan.nextInt();
	int B=scan.nextInt();
	int sum,sub,mul=0;
	sum=A+B;
	sub=A-B;
	mul=A*B;
	if(sum>=sub &&(sum>=mul)){
		System.out.println(sum);
	}
	else if(sub>=sum &&(sub>=mul)){
		System.out.println(sub);
	}
	else{
		System.out.println(mul);
	}
	}

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

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

int main(){
    string n;
    cin >> n;
    for(int i=0; i<n.size(); i++){
        if(n.at(i) == '1') n.at(i) = '9';
        else s.at(i) = '1';
    }

    cout << n << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 's' was not declared in this scope
    9 |         else s.at(i) = '1';
      |              ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'cout'
    8 |   cout << sum << endl;
      |   ^~~~
Language: C++

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

int main() {
  int A,B;
  con >> A >> B;
  if(A == 1 && B == 1){
    cout << 2 << endl;
  }
else if(A > 0 && B > 0){
  cout << A * B << endl;
}
if(A > 0 && A < 0){
  cout << A - B << endl;
}
if(A < 0 && B > 0){
    cout << A + B << endl;
}
if(A < 0 && B < 0){
  cout << A * B << endl;
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'con' was not declared in this scope; did you mean 'cos'?
    6 |   con >> A >> B;
      |   ^~~
      |   cos
Language: C++

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

main{
  int a,b;
  cin>>a>>b;
  int c,d,e;
  c=a+b;
  d=a-b;
  e=a*b;
  i=(c,d);
  j=(d,e);
  k=(i,j);
  cout<<k<<endl;
  {

Compiler output:
a.cc:4:1: error: 'main' does not name a type
    4 | main{
      | ^~~~
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, b;
	cin >> a >> b;
	int ans;
	ans = max(A+B, max(A-B, A*B));
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: 'A' was not declared in this scope
   11 |         ans = max(A+B, max(A-B, A*B));
      |                   ^
a.cc:11:21: error: 'B' was not declared in this scope
   11 |         ans = max(A+B, max(A-B, A*B));
      |                     ^
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class MAin{
	public static void main(String[] args) throws IOException {
		try (BufferedReader br = new BufferedReader(
				new InputStreamReader(System.in))) {

			String in = br.readLine();
			String chr[] = in.split(" ");
			int a = Integer.parseInt(chr[0]);
			int b = Integer.parseInt(chr[1]);
			 System.out.println(Math.max(a+b, Math.max(a-b, a*b)));
		}
	}
}

Compiler output:
Main.java:5: error: class MAin is public, should be declared in a file named MAin.java
public class MAin{
       ^
1 error
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) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:40: error: invalid operands of types 'const int' and '<unresolved overloaded function type>' to binary 'operator<<'
    9 |   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, mac(A - B, A * B) << endl;
  return 0;
}

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

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

int main() {
  int A,B;
  cun>>A>>B;
  int plus=A+B;
  int minus=A-B;
  int times=A*B;
  int maximamu=max(plus,max(minus,times));
  cout<<maximamu<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cun' was not declared in this scope
    6 |   cun>>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;
  
}


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:9:14:   required from here
    9 |   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: 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;
  
}

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

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fr(i,j,k) for(int i=j;i<k;i++)
#define f(n) fr(i,0,n)
#define f1(n) fr(i,1,n+1)
#define pb push_back
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define sz(x) (int)x.size()
const int maxn = 10000001;
const int mod = 998244353;

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int a, b;
    cin >> a >> b;
    cout << max({a+b,a-b,a*b}) << '\n'
}  


Compiler output:
a.cc: In function 'int main()':
a.cc:20:39: error: expected ';' before '}' token
   20 |     cout << max({a+b,a-b,a*b}) << '\n'
      |                                       ^
      |                                       ;
   21 | }
      | ~
Language: C++

#define _GLIBCXX_DEBUG
#include<algorithm>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<iostream>
#include<vector>
#include<queue>
#include<deque>
#include<stack>
#include<set>
#include<map>
#include<string>
#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define rep2(i,s,n) for(int i=s;i< (int)n; i++)
#define ll long long 
#define all(v) v.begin(),v.end()
using namespace std;
int main(){
  ll a,b; cin >>a>>b;
  cout max({a+b,a-b,a*b});
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:7: error: expected ';' before 'max'
   22 |   cout max({a+b,a-b,a*b});
      |       ^~~~
      |       ;
a.cc:22:25: error: expected primary-expression before ')' token
   22 |   cout max({a+b,a-b,a*b});
      |                         ^
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)) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected initializer before 'B'
    5 |   int A B;
      |         ^
a.cc:6:10: error: 'A' was not declared in this scope
    6 |   cin >> A >> B;
      |          ^
a.cc:6:15: error: 'B' was not declared in this scope
    6 |   cin >> 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: In function 'int main()':
a.cc:5:9: error: expected initializer before 'B'
    5 |   int A B;
      |         ^
a.cc:6:10: error: 'A' was not declared in this scope
    6 |   cin >> A >> B;
      |          ^
a.cc:6:15: error: 'B' was not declared in this scope
    6 |   cin >> 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: In function 'int main()':
a.cc:5:9: error: expected initializer before 'B'
    5 |   int A B;
      |         ^
a.cc:6:10: error: 'A' was not declared in this scope
    6 |   cin >> A >> B;
      |          ^
a.cc:6:15: error: 'B' was not declared in this scope
    6 |   cin >> 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();
            int plus = a + b;
            int minus = a - b;
            int multi = a * b;
            System.out.println(Math.max(plus, minus, multi)); 
          }
}

Compiler output:
Main.java:11: error: no suitable method found for max(int,int,int)
            System.out.println(Math.max(plus, minus, multi)); 
                                   ^
    method Math.max(int,int) is not applicable
      (actual and formal argument lists differ in length)
    method Math.max(long,long) is not applicable
      (actual and formal argument lists differ in length)
    method Math.max(float,float) is not applicable
      (actual and formal argument lists differ in length)
    method Math.max(double,double) is not applicable
      (actual and formal argument lists differ in length)
1 error
Language: C++

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

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

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;


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:15:3: error: expected ',' or ';' before 'cout'
   15 |   cout << ans << endl;
      |   ^~~~
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();
      	int plus = a + b;
      	int minus = a- b;
      	int multip = a * b;
      	if(plus > minus || plus > multip) {
          System.out.println(plus);
        } else if(minus > plus || minus > mutip) {
          System.out.println(minus);
        } else {
          System.out.println(multip);
        }
    }
}

Compiler output:
Main.java:12: error: cannot find symbol
        } else if(minus > plus || minus > mutip) {
                                          ^
  symbol:   variable mutip
  location: class Main
1 error
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();
      	int plus = a + b;
      	int minus = a- b;
      	int multip = a * b;
      	if(plus >= minus || plus >= multip) {
          System.out.println(plus);
        } else if(minus >= plus || minus >= mutip) {
          System.out.println(minus);
        } else {
          System.out.println(multip);
        }
    }
}

Compiler output:
Main.java:12: error: cannot find symbol
        } else if(minus >= plus || minus >= mutip) {
                                            ^
  symbol:   variable mutip
  location: class Main
1 error
Language: C++

#include <iostream>
#include <algorithm>
#include <math.h>
#include <vector>
#include <string>
#include <queue>
#include <map>
#include <utility>
using namespace std;
using ll = long long;
 
int main() {
	int a,b;
	mi = a +b;
	mi = min(mi, a-b);
	mi = min (mi, a*b);
	cout << mi << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'mi' was not declared in this scope
   14 |         mi = a +b;
      |         ^~
Language: C++

#include <iostream>
#include <cmath>
#include <string>
#include <algorithm>
#include <limits>
#include <ctype.h> 
#include <stdio.h> 
#include <set> 
#include <iomanip>
#include <cstdint>
#include <vector>
 
using namespace std;
 
typedef long long ll;
typedef long double ld;
#define L(ID) ((ID*2)+1)
#define R(ID) ((ID*2)+2)
#define M(L,R) ((L+R)/2)
#define forr(start,end) for(int i = start; i < end; i++)
#define gap ' '




int main() {
	int a = 0, b = 0;
	cin >> a >> b;
	int res = a+b;
	int res1 = a-b;
	int res2 = a*b;
	int ans = −10000;
	ans = max(ans,res);
	ans = max(ans,res1);
	ans = max(ans,res2);
	cout << ans << endl;

    return 0;
} 


Compiler output:
a.cc:32:19: error: extended character − is not valid in an identifier
   32 |         int ans = −10000;
      |                   ^
a.cc: In function 'int main()':
a.cc:32:19: error: '\U0000221210000' was not declared in this scope
   32 |         int ans = −10000;
      |                   ^~~~~~
Language: C++

#include <iostream>
#include <cmath>
#include <string>
#include <algorithm>
#include <limits>
#include <ctype.h> 
#include <stdio.h> 
#include <set> 
#include <iomanip>
#include <cstdint>
#include <vector>
 
using namespace std;
 
typedef long long ll;
typedef long double ld;
#define L(ID) ((ID*2)+1)
#define R(ID) ((ID*2)+2)
#define M(L,R) ((L+R)/2)
#define forr(start,end) for(int i = start; i < end; i++)
#define gap ' '




int main() {
	int a = 0, b = 0;
	cin >> a >> b;
	int res = a+b;
	int res1 = a-b;
	int res2 = a*b;
	int ans = INT_MIN;
	ans = max(ans,res);
	ans = max(ans,res1);
	ans = max(ans,res2);
	cout << ans << endl;

    return 0;
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:32:19: error: 'INT_MIN' was not declared in this scope
   32 |         int ans = INT_MIN;
      |                   ^~~~~~~
a.cc:12:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   11 | #include <vector>
  +++ |+#include <climits>
   12 |
Language: C++

#include <iostream>
#include <cmath>
#include <string>
#include <algorithm>
#include <limits>
#include <ctype.h> 
#include <stdio.h> 
#include <set> 
#include <iomanip>
#include <vector>
 
using namespace std;
 
typedef long long ll;
typedef long double ld;
#define L(ID) ((ID*2)+1)
#define R(ID) ((ID*2)+2)
#define M(L,R) ((L+R)/2)
#define forr(start,end) for(int i = start; i < end; i++)
#define gap ' '




int main() {
	int a = 0, b = 0;
	cin >> a >> b;
	int res = a+b;
	int res1 = a-b;
	int res2 = a*b;
	int ans = INT_MIN;
	ans = max(ans,res);
	ans = max(ans,res1);
	ans = max(ans,res2);
	cout << ans << endl;

    return 0;
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:31:19: error: 'INT_MIN' was not declared in this scope
   31 |         int ans = INT_MIN;
      |                   ^~~~~~~
a.cc:11:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   10 | #include <vector>
  +++ |+#include <climits>
   11 |
Language: C++

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

int main() {
  int A,B;
  cin >> A >> B;
  
  vector<int> vec;
  vec = {A+B, A-B, A*B}
  sort(vec.begin(),vec.end());
  cout << vec.at(2) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: expected ';' before 'sort'
    9 |   vec = {A+B, A-B, A*B}
      |                        ^
      |                        ;
   10 |   sort(vec.begin(),vec.end());
      |   ~~~~
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;
}


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:8:14:   required from here
    8 |   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.Scanner;

public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    
    int A = sc.nextInt();
    int B = sc.nextInt();
    
    int result1 = A + B;
    int result2 = A - B;
    int result3 = A * B;
    
    System.out.println(Math.max(result1,result2,result3));
    


 
  }
}

Compiler output:
Main.java:16: error: no suitable method found for max(int,int,int)
    System.out.println(Math.max(result1,result2,result3));
                           ^
    method Math.max(int,int) is not applicable
      (actual and formal argument lists differ in length)
    method Math.max(long,long) is not applicable
      (actual and formal argument lists differ in length)
    method Math.max(float,float) is not applicable
      (actual and formal argument lists differ in length)
    method Math.max(double,double) is not applicable
      (actual and formal argument lists differ in length)
1 error
Language: C++

#include<iostream>
using namespace std;

int main()
{
  int a, b;
  cin>>a>>b;
  cout<<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: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:8:12:   required from here
    8 |   cout<<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>
using namespace std;

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:8:21: error: expected ')' before ';' token
    8 |   cout<<max(a+b, a-b; a*b);
      |            ~        ^
      |                     )
a.cc:8:26: error: expected ';' before ')' token
    8 |   cout<<max(a+b, a-b; a*b);
      |                          ^
      |                          ;
Language: Java

void main(String args[]){
        Scanner scan = new Scanner(System.in);
        int A = scan.nextInt();
		int B = scan.nextInt();
		scan.close();
        int lg = A+B;
        lg = A-B>lg? A-B : lg;
        lg = A*B>lg? A*B : lg;
        System.out.println(lg); 
    }

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
void main(String args[]){
^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C++

#include <iostream>
#include<math.h>
#include <limits>
#include <iomanip>
#include <algorithm>
using namespace std;
#define rep(i, n) for (int i =0; i < (int)(n); i++)

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/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:14:16:   required from here
   14 |     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: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
  int a,b;
  cin>>a>>b;
  int x1[]={a+b,a-b,a*b};
  sort(x,x+3);
  cout<<x[2];
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: 'x' was not declared in this scope; did you mean 'x1'?
   10 |   sort(x,x+3);
      |        ^
      |        x1
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:24: error: 'max' was not declared in this scope; did you mean 'std::max'?
    5 |     std::cout<<max(a+b,max(a*b,a-b))<<endl;
      |                        ^~~
      |                        std::max
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:303:5: note: 'std::max' declared here
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
a.cc:5:16: error: 'max' was not declared in this scope; did you mean 'std::max'?
    5 |     std::cout<<max(a+b,max(a*b,a-b))<<endl;
      |                ^~~
      |                std::max
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
a.cc:5:39: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 |     std::cout<<max(a+b,max(a*b,a-b))<<endl;
      |                                       ^~~~
      |                                       std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

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

Compiler output:
a.cc:2:17: error: 'ptd' is not a namespace-name
    2 | using namespace ptd;
      |                 ^~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> a >> b;
      |   ^~~
      |   std::cin
In file included from /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:9: error: 'max' was not declared in this scope; did you mean 'std::max'?
    7 |   int k=max(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)
      |     ^~~
a.cc:8:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   cout << max(k,a*b) << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |   cout << max(k,a*b) << 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, d, s, m;
	scanf("%d %d", &A, &B);
	
	if(A + B > A * B && A + B > A - B){
		d = A + B;
		printf("%d", d);
	}

	else if(A * B > A + B && A * B > A - B){
		m = A * B;
		printf("%d", m);
	}

	else{
		s = A - B;
		printf("%d", s);
	}
	return 0;

Compiler output:
main.c: In function 'main':
main.c:20:9: error: expected declaration or statement at end of input
   20 |         return 0;
      |         ^~~~~~
Language: C

#include "stdio.h"
int main(){
	int A, B, d, s, m;
	scanf("%d %d", A, B);
	d = A + B;
	s = A - B;
	m = A * B;
	if(A + B > A * B && A + B > A - B){
		printf("%d", d);
	}

	elif(A * B > A + B && A * B > A - B){
		prinft("%d", m);
	}

	else{
		printf("%d", s);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:9: error: implicit declaration of function 'elif' [-Wimplicit-function-declaration]
   12 |         elif(A * B > A + B && A * B > A - B){
      |         ^~~~
main.c:12:45: error: expected ';' before '{' token
   12 |         elif(A * B > A + B && A * B > A - B){
      |                                             ^
      |                                             ;
Language: C

#include <stdio.h>
#include <limits.h>
int main ()
{
    int a=0,b=0,soma=0,sub=0,multi=0,maior=0;
    scanf("%d %d",&a,&b);
    soma= a+(b);
    sub= a-b;
    multi=a *b;

    if(soma>sub ||soma>multi)
    {
        printf("%d",soma);
    }
    else if(sub>soma|| sub>multi)
    {
        printf("%d",sub);

    }
    else if(multi>sub || multi>soma)
    {
        printf("%d",multi);
    }
    return 0;


Compiler output:
main.c: In function 'main':
main.c:24:5: error: expected declaration or statement at end of input
   24 |     return 0;
      |     ^~~~~~
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:5:1: 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:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 | 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:7:9: error: 'max' was not declared in this scope; did you mean 'std::max'?
    7 | 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;
	int soma, sub, mult, maior=0;
	
	scanf("%d %d",&A,&B);
	if((A<-1000 || B <-1000) || (A>1000 || B >1000))
	do{
	scanf("%d %d",&A,&B);
	
	}while((A<-1000 || B <-1000) || (A>1000 || B >1000));
	
		soma=A+B;
		sub=A-B;
		mult=A*B;
		else if(soma > sub && soma > mult){
		maior=soma;
		}
		else if(sub > soma && sub > mult){
			maior=sub;
		}
		else if(mult > soma && mult > sub){
			maior=mult;
		}
	
	printf("%d", maior);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:17:17: error: 'else' without a previous 'if'
   17 |                 else if(soma > sub && soma > mult){
      |                 ^~~~
Language: Java

import java.util.Scanner;

public class B {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int largest = a + b;
        if (a - b > largest) {
            largest = a - b;
        } else if (a * b > largest) {
            largest = a * b;
        }
        System.out.println(largest);
    }
}

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

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

#define ll long long
#define ar array

int main() {

    ios::sync_with_stdio(false);
	
	int a, b, soma, menos, vzs;
	
	cin >> a >> b;
	
	soma = a+b;
	menos = a-b;
	vzs = a*b;
	
	if(soma > menos && soma > vzs){
		cout << soma << endl;
	}
	else if(menos > soma && menos > vzs){
		cout << menos << endl;
	}
	else (vzs > soma && vzs > menos){
		cout << vzs << endl;
	}

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:41: error: expected ';' before '{' token
   25 |         else (vzs > soma && vzs > menos){
      |                                         ^
      |                                         ;
Language: C++

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

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

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

#include <iostream>
#include <string>
#include <math.h>
#include <vector>
#include <algorithm>

using namespace std;

void A_98()
{
  int A, B;
  cin >> A >> B;

  long long max = A + B;
  if (max < A - B) max = A - B;
  else if (max < A*B) max = A * B;

  cout << max << endl;
}

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 <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define FOR(i,n,m) for(int i=(int)(n); i<=(int)(m); i++)
#define RFOR(i,n,m) for(int i=(int)(n); i>=(int)(m); i--)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define RITR(x,c) for(__typeof(c.rbegin()) x=c.rbegin();x!=c.rend();x++)
#define setp(n) fixed << setprecision(n)

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 (a>b) { a=b; return 1; } return 0; }

#define ll long long
#define vll vector<ll>
#define vi vector<int>
#define pll pair<ll,ll>
#define pi pair<int,int>

#define all(a) (a.begin()),(a.end())
#define rall(a) (a.rbegin()),(a.rend())
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define ins insert

using namespace std;

/* Some Libraries */

//-------------------------------------------------

int main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int a,b; cina>>a>>b;
    cout<<max(a+b, max(a-b,a*b))<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:14: error: 'cina' was not declared in this scope
   37 |     int a,b; cina>>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);
}

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);
      |         ~~~^~~~~~~~~~~~~
/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>
#include <math.h>
#define REP(i, n) for(int i = 0; i < (n); i++)
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1001001001;
const int mINF = -1001001001;


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


Compiler output:
a.cc: In function 'int main()':
a.cc:18:15: error: 'maxF' was not declared in this scope
   18 | int ans = max(maxF,c);
      |               ^~~~
Language: C++

#include<iostream>
#include<stdio.h>
//#include <bits/stdc++.h>
#include<vector>
#include<float.h>
#include<iomanip>
#include<algorithm>
#include<string>
#include<cstring>
#include<math.h>
#include<cmath>
#include<sstream>
#include<set>
#include<map>
#include<queue>
#include <cassert>
#include <cmath>
#include<cstdint>

#define INF 1e9
#define rep(i,n)for(int i=0;(i)<(int)(n);i++)
#define REP(i,a,b)for(int i=(int)(a);(i)<=(int)(b);i++)
#define VEC(type, c, n) std::vector<type> c(n);for(auto& i:c)std::cin>>i;
#define vec(type,n) vector<type>(n)
#define vvec(m,n) vector<vector<int>> (int(m),vector<int>(n))
#define ALL(a)  (a).begin(),(a).end()

using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using P = pair<int,int>;

vector<int>bitSearch(int bit,int n){
    vector<int>S;
    rep(i,n)if(bit&(1<<i))S.push_back(i);
    return S;
}



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: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:43:14:   required from here
   43 |     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: C++

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

Compiler output:
a.cc:1:91: warning: extra tokens at end of #include directive
    1 | #include <iostream>                                                                       #include <algorithm>                                                                      using namespace std;                                                                                                                                                                int main(){                                                                                 int a, b;                                                                                 cin >> a >> b;                                                                                                                                                                      int ret = max(a+b, max(a-b, a*b));                                                        cout << ret << endl;                                                                      return 0;                                                                               }
      |                                                                                           ^
/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<bits/stdc++.h>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:36: error: expected primary-expression before '<<' token
    7 |     cout << max(a+b,max(a-b,a*b)); << endl;
      |                                    ^~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: error: expected ';' before 'return'
    7 |     max(a+b,max(a-b,a*b))
      |                          ^
      |                          ;
    8 |     return 0;
      |     ~~~~~~                
a.cc:7:8: warning: ignoring return value of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&) [with _Tp = int]', declared with attribute 'nodiscard' [-Wunused-result]
    7 |     max(a+b,max(a-b,a*b))
      |     ~~~^~~~~~~~~~~~~~~~~~
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:257:5: note: declared here
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
Language: C

#include<stdio.h>
//UG02 53 20 020
int main()
{
    int A,B;
    scanf("%d%d",&A,&B);

    if(A+B>A-B){
        if(A+B>A*B){
            printf("%d\n",A+B);
        }
    }
    if(A-B>A*B){
        if(A-B>A+B){
            printf("%d\n",A-B);
        }
    }
    if(A*B>A-B){
        if(A*B>A+B){
            printf("%d\n",A*B);
        }
        return 0;
    }
}
Comment in Markdown
Preview:

Compiler output:
main.c:25:1: error: unknown type name 'Comment'
   25 | Comment in Markdown
      | ^~~~~~~
main.c:25:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Markdown'
   25 | Comment in Markdown
      |            ^~~~~~~~
main.c:25:12: error: unknown type name 'Markdown'
Language: C++

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

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: expected ';' before ':' token
    9 |   c=a*b:
      |        ^
      |        ;
Language: C++

#include<bits.stdc++.h>
using namespace std;
int main(){
  int a,b,c,mx;
  cin >> a >> b;
  mx=a+b;
  c=a-b;
  if(mx<c)mx=c;
  c=a*b:
  if(mx<c)mx=c;
  cout << mx << endl;
}
  

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

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

int main() {
	int A,B;
    cin >> A >> B;
    vector<int> s(3);
    s.at(0) = A+B;
    s.at(1) = A-B;
    s.at(2) = A*B;
    sort(s.begin(),s.end()):
    cout << s.at(2) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:28: error: expected ';' before ':' token
   11 |     sort(s.begin(),s.end()):
      |                            ^
      |                            ;
Language: C++

#include<iostream>
using namespace std ;
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:7:14: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    7 |   cout << 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()
{
  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:7:14: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    7 |   cout << 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