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

#include <iostream>
int main(){
   int=a,b,c;
   cin>>a ;
   if(a==1) cout<<"Hello World"<<endl;
   cin>>b>>c;
   cout<<b+c<<endl;
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:7: error: expected unqualified-id before '=' token
    3 |    int=a,b,c;
      |       ^
a.cc:4:4: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |    cin>>a ;
      |    ^~~
      |    std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:4:9: error: 'a' was not declared in this scope
    4 |    cin>>a ;
      |         ^
a.cc:5:13: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |    if(a==1) cout<<"Hello World"<<endl;
      |             ^~~~
      |             std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:5:34: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 |    if(a==1) cout<<"Hello World"<<endl;
      |                                  ^~~~
      |                                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:6:9: error: 'b' was not declared in this scope
    6 |    cin>>b>>c;
      |         ^
a.cc:6:12: error: 'c' was not declared in this scope
    6 |    cin>>b>>c;
      |            ^
a.cc:7:4: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |    cout<<b+c<<endl;
      |    ^~~~
      |    std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |    cout<<b+c<<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 <cstdio>
#include <cmath>
#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;

int main(){
	int n;
	scanf("%d", &n);
	if (n == 1);
		printf("hello world");
    else{
    	int a, b;
    	scanf("%d %d",&a,&b);
    	printf("%d\n", a + b);
    }
    return 0;
}    

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'else' without a previous 'if'
   13 |     else{
      |     ^~~~
Language: C++

#include<stdio.h>
int main(){
	int n,a,b,sum;
	scanf("%d",&n);
	if (n == 1){
		printf("Hello World\n");
	}
	else if (n == 2){
		scanf("%d%d",&a,&b);
		sum = a + b;
		printf("%d\n",sum);
	}
	retutn 0;
}

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

#include<stdio.h>
int main(){
	int n,a,b,sum;
	scanf("%d",&n);
	if (n == 1){
		printf("Hello World\n");
		}
	else{
		scanf("%d%d",&a,&b);
		sum = a + b;
		printf("%d\n",sum);
		}
	retutn 0;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'retutn' was not declared in this scope
   13 |         retutn 0;
      |         ^~~~~~
Language: Java

import java.util.*;
import java.lang.*;
import java.io.*;
public class Main {
	public static void main(String[] args) {
		Scannenr sc = new Scanner (System.in);
		int N = sc.nextInt();
		if (N == 1) {
			System.out.println ("Hello World");
		} else {
			int A = sc.nextInt(), B = sc.nextInt();
			System.out.println(A + B);
		}
	}
}

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

import java.util.*;
import java.lang.*;
import java.io.*;
public class main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt(), B = sc.nextInt();
		int x = A + B;
		int N = sc.nextInt();
		if (N == 1) {
			System.out.println("Hello World");
		} else {
			System.out.println(x);
		}
	}
}

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

public class main {
	public static void main(String[] args) {
		int x = A + B;
		int N = 0;
		if (N == 1) {
			System.out.println("Hello World");
		} else {
			System.out.println(x);
		}
	}
}

Compiler output:
Main.java:1: error: class main is public, should be declared in a file named main.java
public class main {
       ^
Main.java:3: error: cannot find symbol
		int x = A + B;
		        ^
  symbol:   variable A
  location: class main
Main.java:3: error: cannot find symbol
		int x = A + B;
		            ^
  symbol:   variable B
  location: class main
3 errors
Language: Java

public class main {
	public static void main(String[] args) {
		int x = A + B;
		int N = 0;
		if (N == 1) {
			System.out.println(Hello World);
		} else {
			System.out.println(x);
		}
	}
}

Compiler output:
Main.java:6: error: ')' or ',' expected
			System.out.println(Hello World);
			                        ^
Main.java:6: error: not a statement
			System.out.println(Hello World);
			                         ^
Main.java:6: error: ';' expected
			System.out.println(Hello World);
			                              ^
3 errors
Language: C++

#include <iostream.h>


int main(){

    int N = 0;
    cin >> N;

    switch(N){
    case 1:
        cout << "Hello world" << endl;
        break;

    case 2:
        cin << A ;
        cin << B ;
        cout << A + B << endl;
        break;

    default:
        break;
    }

    return 0;
}

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

#include<stdio.h>

int main(){
  
  int a,b,c;
  scanf("%d",&a);
  if(a == 1){
    printf ("Hellow world");
  else if (a == 2)
    scanf("%d",&b,&c);
  printf ("%d",b+c);
  }
  return 0;
  
}

    

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected '}' before 'else'
    9 |   else if (a == 2)
      |   ^~~~
a.cc:7:13: note: to match this '{'
    7 |   if(a == 1){
      |             ^
a.cc: At global scope:
a.cc:13:3: error: expected unqualified-id before 'return'
   13 |   return 0;
      |   ^~~~~~
a.cc:15:1: error: expected declaration before '}' token
   15 | }
      | ^
Language: C++

#include<bits/stdc++.h>
 using namespace std;
 int main()
 { int n,a,b scanf("%d",&n); if(n==1)printf("Hello World"）； else { cin>>a>>b; cout<<a+b; } return 0; }

Compiler output:
a.cc: In function 'int main()':
a.cc:4:14: error: expected initializer before 'scanf'
    4 |  { int n,a,b scanf("%d",&n); if(n==1)printf("Hello World"）； else { cin>>a>>b; cout<<a+b; } return 0; }
      |              ^~~~~
a.cc:4:45: error: unable to find string literal operator 'operator""\U0000ff09\U0000ff1b' with 'const char [12]', 'long unsigned int' arguments
    4 |  { int n,a,b scanf("%d",&n); if(n==1)printf("Hello World"）； else { cin>>a>>b; cout<<a+b; } return 0; }
      |                                             ^~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h> using namespace std; int main() { int n,a,b scanf("%d",&n); if(n==1)printf("Hello World"）； else { cin>>a>>b; cout<<a+b; } return 0; }

Compiler output:
a.cc:1:25: warning: extra tokens at end of #include directive
    1 | #include<bits/stdc++.h> using namespace std; int main() { int n,a,b scanf("%d",&n); if(n==1)printf("Hello World"）； else { cin>>a>>b; cout<<a+b; } 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 <iostream>
using namespace std;

int main() {

	int buff1 = 0;
	cin >> buff1;
	
	if (buff1 == 0) [
		cout << "Hello World/n"
	} else {
		int a, b;
		cin >> a >> b;
		cout << (a+b);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: warning: capture of variable 'std::cout' with non-automatic storage duration
   10 |                 cout << "Hello World/n"
      |                 ^~~~
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::ostream std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:21: error: expected ',' before '<<' token
   10 |                 cout << "Hello World/n"
      |                     ^~~
      |                     ,
a.cc:10:22: error: expected identifier before '<<' token
   10 |                 cout << "Hello World/n"
      |                      ^~
a.cc:10:40: error: expected ']' before '}' token
   10 |                 cout << "Hello World/n"
      |                                        ^
      |                                        ]
   11 |         } else {
      |         ~                               
a.cc: In lambda function:
a.cc:11:9: error: expected '{' before '}' token
   11 |         } else {
      |         ^
a.cc: In function 'int main()':
a.cc:10:40: error: expected ';' before '}' token
   10 |                 cout << "Hello World/n"
      |                                        ^
      |                                        ;
   11 |         } else {
      |         ~                               
a.cc: At global scope:
a.cc:11:11: error: expected unqualified-id before 'else'
   11 |         } else {
      |           ^~~~
a.cc:16:9: error: expected unqualified-id before 'return'
   16 |         return 0;
      |         ^~~~~~
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
                if(n == 1){
                    System.out.println(Hello World);
                } else {
                    int a = sc.nextInt();
		    int b = sc.nextInt();
                    System.out.println(a + b);
                }
	}
}

Compiler output:
Main.java:7: error: ')' or ',' expected
                    System.out.println(Hello World);
                                            ^
Main.java:7: error: not a statement
                    System.out.println(Hello World);
                                             ^
Main.java:7: error: ';' expected
                    System.out.println(Hello World);
                                                  ^
3 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int a = sc.nextInt();
		int b = sc.nextInt();
                if(n == 1){
                    System.out.println(Hello World);
                } else {
                int a = sc.nextInt();
		int b = sc.nextInt();
                    System.out.println(a + b);
                }
	}
}

Compiler output:
Main.java:9: error: ')' or ',' expected
                    System.out.println(Hello World);
                                            ^
Main.java:9: error: not a statement
                    System.out.println(Hello World);
                                             ^
Main.java:9: error: ';' expected
                    System.out.println(Hello World);
                                                  ^
3 errors
Language: C++

int main()
{
	int N, T;
	std::cin >> N >> T;
	const int MinCostMax = 1000;
	int minCost = MinCostMax + 1;
	for (int i = 0; i < N; i++) {
		int c, t;
		std::cin >> c >> t;
		if (c < minCost && t <= T)
		{
			minCost = c;
		}
	}
	if (minCost > 1000)
	{
		std::cout << "TLE";
		return 0;
	}
	std::cout << minCost;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:14: error: 'cin' is not a member of 'std'
    4 |         std::cin >> N >> T;
      |              ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main()
a.cc:9:22: error: 'cin' is not a member of 'std'
    9 |                 std::cin >> c >> t;
      |                      ^~~
a.cc:9:22: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:22: error: 'cout' is not a member of 'std'
   17 |                 std::cout << "TLE";
      |                      ^~~~
a.cc:17:22: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:20:14: error: 'cout' is not a member of 'std'
   20 |         std::cout << minCost;
      |              ^~~~
a.cc:20:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <stdio.h>
int N;
cin >> N >> endl;

if(N == 1){
cout << "Hello World" << endl;
}

if(N == 2){
int A, B;
  cin >> A >> B;
cout << A + B << endl;
}

Compiler output:
a.cc:3:1: error: 'cin' does not name a type
    3 | cin >> N >> endl;
      | ^~~
a.cc:5:1: error: expected unqualified-id before 'if'
    5 | if(N == 1){
      | ^~
a.cc:9:1: error: expected unqualified-id before 'if'
    9 | if(N == 2){
      | ^~
Language: C++

int N;
cin >> N >> endl;

if(N == 1){
cout << "Hello World" << endl;
}

if(N == 2){
int A, B;
  cin >> A >> B;
cout << A + B << endl;
}

Compiler output:
a.cc:2:1: error: 'cin' does not name a type
    2 | cin >> N >> endl;
      | ^~~
a.cc:4:1: error: expected unqualified-id before 'if'
    4 | if(N == 1){
      | ^~
a.cc:8:1: error: expected unqualified-id before 'if'
    8 | if(N == 2){
      | ^~
Language: C++

#include <iostream>

using namespace std;

int main(){
  	int n;
	cin>>n;
  	if(n==1) cout<<"Hello World"<<endl;
  	else{
      int A,B;
      cin>>A;
      cin>>B;
      cout<<A+B<<endl;
    }
  return;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: return-statement with no value, in function returning 'int' [-fpermissive]
   15 |   return;
      |   ^~~~~~
Language: C++

#coding: utf-8

if int(input()) == 1:
 print 'Hello World'
else:
 A = int(input)
 B = int(input)
 C = A + B
 print C

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #coding
    1 | #coding: utf-8
      |  ^~~~~~
a.cc:4:8: warning: multi-character literal with 11 characters exceeds 'int' size of 4 bytes
    4 |  print 'Hello World'
      |        ^~~~~~~~~~~~~
a.cc:3:1: error: expected unqualified-id before 'if'
    3 | if int(input()) == 1:
      | ^~
Language: C++

#include <stdio.h>
#include "stdafx.h"
int main(void) {

	int A = 0,B = 0,N = 0;
	do {
		scanf_s("%d", &N);
		
	} while (N != 1 && N !=2);

		if (N == 1) {
			puts("Hello　World");
		}
		else if (N == 2) 
		{
			do {
				printf("A:"); scanf_s("%d", &A);
			} while (A < 1 || 9 < A);

			do {
				printf("B:"); scanf_s("%d", &B);
			} while (B < 1 || 9 < B);

			printf("A + B = %d\n", A + B);
		}

	return (0);
}


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

GI = lambda: int(input()); GIS = lambda: map(int, input().split()); LGIS = lambda: list(GIS())

def main():
    sols = [LGIS() for _ in range(GI())]

    for cx in range(0, 101):
        for cy in range(0, 101):
            lastH = None
            for x, y, h in sols:
                factor = abs(x - cx) + abs(y - cy)
                H = h + factor
                if H < 1:
                    continue
                if h == 0 and H <= factor:
                    continue
                if lastH:
                    if H != lastH:
                        break
                lastH = H
            else:
                print(cx, cy, H)
                return

main()

Compiler output:
a.cc:1:1: error: 'GI' does not name a type
    1 | GI = lambda: int(input()); GIS = lambda: map(int, input().split()); LGIS = lambda: list(GIS())
      | ^~
a.cc:1:28: error: 'GIS' does not name a type
    1 | GI = lambda: int(input()); GIS = lambda: map(int, input().split()); LGIS = lambda: list(GIS())
      |                            ^~~
a.cc:1:69: error: 'LGIS' does not name a type
    1 | GI = lambda: int(input()); GIS = lambda: map(int, input().split()); LGIS = lambda: list(GIS())
      |                                                                     ^~~~
Language: C++

//programmingEducation.cpp

using namespace std;

int main () {
  int n;
  cin >> n;
  if (n == 1) {
    cout << "Hello World";
  } else {
  int a; int b;
  cin >> a;
  cin >> b;
  cout << a + b;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> n;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | //programmingEducation.cpp
a.cc:9:5: error: 'cout' was not declared in this scope
    9 |     cout << "Hello World";
      |     ^~~~
a.cc:9:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:3: error: 'cout' was not declared in this scope
   14 |   cout << a + b;
      |   ^~~~
a.cc:14:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

N = int(input())
if N == 1:
    print('Hello World')
else:
    a = int(input())
    b = int(input())
    print(a + b)


Compiler output:
a.cc:3:11: warning: multi-character literal with 11 characters exceeds 'int' size of 4 bytes
    3 |     print('Hello World')
      |           ^~~~~~~~~~~~~
a.cc:1:1: error: 'N' does not name a type
    1 | N = int(input())
      | ^
Language: C++

#include<cstdlib>
#include<iostream>
using namespace std;
int main()
{
    // 1 or 2
    int N;
    int A;
    int B;

    cin >> N;
    if (N == 1)
        {
        cout << “Hello World” << endl;
        } else {
	cin >> A;
	cin >> B;
	cout << A + B << endl;
        }
     return 0;

}


Compiler output:
a.cc:14:17: error: extended character “ is not valid in an identifier
   14 |         cout << “Hello World” << endl;
      |                 ^
a.cc:14:24: error: extended character ” is not valid in an identifier
   14 |         cout << “Hello World” << endl;
      |                        ^
a.cc: In function 'int main()':
a.cc:14:17: error: '\U0000201cHello' was not declared in this scope
   14 |         cout << “Hello World” << endl;
      |                 ^~~~~~
Language: C++

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

int main() {
	
	string s;
	cin>>s;
	
	for(char c: s) {
		if(c == '1')
        {
          cout<<'Hello World';
        }if else(c == '2')
        {
          int a;
          int b;
          cin>>a;
          cin>>b;
          int c = a + b;
          cout<<c;
        }
      
	}
	cout<<endl;
	
	return 0;
}

Compiler output:
a.cc:13:17: warning: multi-character literal with 11 characters exceeds 'int' size of 4 bytes
   13 |           cout<<'Hello World';
      |                 ^~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:14:13: error: expected '(' before 'else'
   14 |         }if else(c == '2')
      |             ^~~~
      |             (
Language: C++

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

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

int main() {
	int n;
	cin >> n;
	if (n == 1)
	{
		printf("Hello World\n");
	}
	else
	{
		int a, b;
		cin >> a >> b;
		printf(a+b);
	}
	return 0;
}

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

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

    if (N==1)
        printf("Hello World\n");

    else(N==2){
        scanf("%d,%d\n",A,B);
        printf("%d\n",A+B);
}
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:15: error: expected ';' before '{' token
    9 |     else(N==2){
      |               ^
      |               ;
Language: C

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

    if (N==1)
        printf("Hello World\n");

    elif(N==2){
        scanf("%d,%d\n",A,B);
        printf("%d\n",A+B);
}
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:5: error: implicit declaration of function 'elif' [-Wimplicit-function-declaration]
    9 |     elif(N==2){
      |     ^~~~
main.c:9:15: error: expected ';' before '{' token
    9 |     elif(N==2){
      |               ^
      |               ;
Language: C

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

    if (x==1)
        printf("Hello World\n");

    if(x==2){
        scanf("%d %d\n",A,B);
        printf("%d\n",A+B);
}
    return 0;
}

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

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

    if (x==1)
        printf("Hello World\n");

    if(x==2){
        scanf("%d %d\n",A,B);
        printf("%d\n",A+B);
}
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'x' was not declared in this scope
    6 |     if (x==1)
      |         ^
a.cc:9:8: error: 'x' was not declared in this scope
    9 |     if(x==2){
      |        ^
Language: C

#include<stdio.h>
int main(){
    int x,A,B;
    scanf("%d",&x);
    if(x==1)
    printf("Hello World");
    elif(x==2){
    scanf("%d %d",&A,&B);
    printf("%d",A+B);
}
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:5: error: implicit declaration of function 'elif' [-Wimplicit-function-declaration]
    7 |     elif(x==2){
      |     ^~~~
main.c:7:15: error: expected ';' before '{' token
    7 |     elif(x==2){
      |               ^
      |               ;
Language: C

#include<stdio.h>
int main(){
    int x,A,B;
    scanf("%d",&x)
    if(x==1)
    printf("Hello World");
    elif(x==2){
    scanf("%d %d",&A,&B);
    printf("%d",A+B);
}
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:19: error: expected ';' before 'if'
    4 |     scanf("%d",&x)
      |                   ^
      |                   ;
    5 |     if(x==1)
      |     ~~             
main.c:7:5: error: implicit declaration of function 'elif' [-Wimplicit-function-declaration]
    7 |     elif(x==2){
      |     ^~~~
main.c:7:15: error: expected ';' before '{' token
    7 |     elif(x==2){
      |               ^
      |               ;
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:4:19: error: expected ';' before 'if'
    4 |     scanf("%d",&x)
      |                   ^
      |                   ;
    5 |     if(x==1)
      |     ~~             
main.c:7:5: error: 'else' without a previous 'if'
    7 |     else(x==2){
      |     ^~~~
main.c:7:15: error: expected ';' before '{' token
    7 |     else(x==2){
      |               ^
      |               ;
Language: C

#include<stdio.h>
int main(){
    int x,A,B;
    if(x==1)
    printf('Hello World');
    else(x==2){
    scanf('%d %d',&A,&B);
    printf('%d',A+B);
}
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:12: warning: multi-character literal with 11 characters exceeds 'int' size of 4 bytes
    5 |     printf('Hello World');
      |            ^~~~~~~~~~~~~
main.c:5:12: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
    5 |     printf('Hello World');
      |            ^~~~~~~~~~~~~
      |            |
      |            int
In file included from main.c:1:
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:6:15: error: expected ';' before '{' token
    6 |     else(x==2){
      |               ^
      |               ;
main.c:7:11: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    7 |     scanf('%d %d',&A,&B);
      |           ^~~~~~~
main.c:8:12: warning: multi-character character constant [-Wmultichar]
    8 |     printf('%d',A+B);
      |            ^~~~
Language: C++

#include <stdio.h>

int main(){int N,a,b,c;
           scanf("%d",&N);
     
           if(N==1){printf("Hello World¥n");}
             else if(N==2){
               scanf("%d%d",&a&b);
               c=a+b;
               printf("%.0d¥n",c);}
           return 0;}
           


Compiler output:
a.cc: In function 'int main()':
a.cc:8:31: error: invalid operands of types 'int*' and 'int' to binary 'operator&'
    8 |                scanf("%d%d",&a&b);
      |                             ~~^~
      |                             |  |
      |                             |  int
      |                             int*
Language: C++

#include <stdio.h>

int main(){int N,a,b;
           scanf("%d",&N);
           scanf("%d",&a);
           scanf("%d",&b);
           c=a+b;
           if(N==1){printf("Hello World ¥n");}
             else if(N==2){printf("%d ¥n",c);}
           return 0;}
           


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

#include <stdio.h>

int main(){int N,a,b;
           scanf("%d",&N);
           scanf("%d",&a);
           scanf("%d",&b);
           if(N==1){printf("Hello World ¥n")};
             else if{printf("%d+%d",a,b)};
           return 0}
           

Compiler output:
a.cc: In function 'int main()':
a.cc:7:45: error: expected ';' before '}' token
    7 |            if(N==1){printf("Hello World ¥n")};
      |                                             ^
      |                                             ;
a.cc:8:14: error: 'else' without a previous 'if'
    8 |              else if{printf("%d+%d",a,b)};
      |              ^~~~
a.cc:8:21: error: expected '(' before '{' token
    8 |              else if{printf("%d+%d",a,b)};
      |                     ^
      |                     (
a.cc:9:20: error: expected ';' before '}' token
    9 |            return 0}
      |                    ^
      |                    ;
Language: C++

#include<iostream>
using namespace std;
int main(){
int A, B, C, N;
	cin >> N;
if (N = 1)cout << "Hello World" << endl;
else {
	cin >> A;
	cin >> B;
}
cout << A + B;
return 0;

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

#include<iostream>
using namespace std;
int main(){
int A,B,C;
	cin >> N;
if (N = 1)cout << "Hello World" << endl;
else {
	cin >> A;
	cin >> B;
}
cout << A + B;
return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: 'N' was not declared in this scope
    5 |         cin >> N;
      |                ^
a.cc:12:10: error: expected '}' at end of input
   12 | return 0;
      |          ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main{
int A,B,C
	cin >> N;
if (N = 1)cout << "Hello World" << endl;
else {
	cin >> A;
	cin >> B;
}
cout << A + B;
return 0;

Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main{
      |     ^~~~
a.cc:4:1: error: expected primary-expression before 'int'
    4 | int A,B,C
      | ^~~
a.cc:4:1: error: expected '}' before 'int'
a.cc:3:9: note: to match this '{'
    3 | int main{
      |         ^
a.cc:6:1: error: expected unqualified-id before 'if'
    6 | if (N = 1)cout << "Hello World" << endl;
      | ^~
a.cc:7:1: error: expected unqualified-id before 'else'
    7 | else {
      | ^~~~
a.cc:11:1: error: 'cout' does not name a type
   11 | cout << A + B;
      | ^~~~
a.cc:12:1: error: expected unqualified-id before 'return'
   12 | return 0;
      | ^~~~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int Age,A,B
  cin >> Age >> A >> B;
  if (Age == 1){
    cout <<"Hello world!" <<endl;
  }else{
    cout << A+B <<endl;
  }
}


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

function Main(input){
let kai = input.split("\n")
if(kai[0] == 1){
console.log("Hello World")
}else if(kai[0] == 2){
console.log(kai[1] + kai[2])
} 
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));

Compiler output:
a.cc:1:1: error: 'function' does not name a type; did you mean 'union'?
    1 | function Main(input){
      | ^~~~~~~~
      | union
a.cc:9:5: error: expected constructor, destructor, or type conversion before '(' token
    9 | Main(require("fs").readFileSync("/dev/stdin", "utf8"));
      |     ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int firstnumber = sc.nextInt();
		// スペース区切りの整数の入力
    if(firstnumber == 1){
      System.out.println("Hello World")
    }
    else {
      int a = sc.nextInt();
  		int b = sc.nextInt();
      // 出力
  		System.out.println(a+b);
    }
	}
}


Compiler output:
Main.java:9: error: ';' expected
      System.out.println("Hello World")
                                       ^
1 error
Language: C++

int main() {
    int n;
    cin >> n;
    if(n==1){
        cout << "Hello World";
    }else if(n==2){
        int a,b;
        cout << a + b;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> n;
      |     ^~~
a.cc:5:9: error: 'cout' was not declared in this scope
    5 |         cout << "Hello World";
      |         ^~~~
a.cc:8:9: error: 'cout' was not declared in this scope
    8 |         cout << a + b;
      |         ^~~~
Language: C++

#include <stdio.h>

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

int main(void)
{
    int     level;
    int     a, b;
    scanf("%d", &level);
    if(level == 1)
        printf("Hello World\n");
    else if(level == 2){
        scanf("%d", &a);
        scanf("%d", &b);
        printf("%d\n", a + b);
    }
    return (0);
}
    if(level == 1)
        printf("Hello World\n");
    else if(level == 2){
        scanf("%d", &a);
        scanf("%d", &b);
        printf("%d\n", a + b);
    }
    return (0);
}

Compiler output:
a.cc:7:25: error: stray '#' in program
    7 |     scanf("%d", &level);#include <stdio.h>
      |                         ^
a.cc: In function 'int main()':
a.cc:7:26: error: 'include' was not declared in this scope
    7 |     scanf("%d", &level);#include <stdio.h>
      |                          ^~~~~~~
a.cc:7:35: error: 'stdio' was not declared in this scope; did you mean 'stdin'?
    7 |     scanf("%d", &level);#include <stdio.h>
      |                                   ^~~~~
      |                                   stdin
a.cc:9:1: error: expected primary-expression before 'int'
    9 | int main(void)
      | ^~~
Language: C++

#include <iostream>
using namespace std;
int main() {
	int N;
	cin >> N;
	if(N == 1) {
		cout << "Hello World" << endl;
	}
	else {
		int A, B;
		cin >> A >> B;
		cout << A + B << endl;
	}
	return 0;
}
#include <iostream>
using namespace std;
int main() {
	int N;
	cin >> N;
	if(N == 1) {
		cout << "Hello World" << endl;
	}
	else {
		int A, B;
		cin >> A >> B;
		cout << A + B << endl;
	}
	return 0;
}


Compiler output:
a.cc:18:5: error: redefinition of 'int main()'
   18 | int main() {
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main() {
      |     ^~~~
Language: C++

#include<bits/c++.h>

using namespace std;

int main(){
    int a,b,c;
    cin >> a;
    if(a==1){
        cout<<'Hello World'<<endl;
    }else{
        cin >>b>>c;
        cout << b+c << endl;
    }
    
}

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

#include <iostream>
using namespace std;

int main(){
	int n;
	cin >> n;
	if(n == 1){
		cout << "Hello World" << endl;
	}else{
		int a,b;
		cin >> a >> b;
		cout << a+b << endl;
	}
	return 0;
]

Compiler output:
a.cc: In function 'int main()':
a.cc:15:1: error: expected primary-expression before ']' token
   15 | ]
      | ^
a.cc:15:2: error: expected '}' at end of input
   15 | ]
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define REP(i, n) for (ll (i) = 0; (i) < (n); (i)++)
#define REPI(i, a, b) for (ll (i) = (a); (i) < (b); (i)++)
#define int long long
using namespace std;
using II = pair<int, int>;
using VI = vector<int>;
using VVI = vector<VI>;
using VVVI = vector<VVI>;
const int MOD = 1e9 + 7;
 
signed main() {
  int N; cin >> N;
  if (N == 1) {
    cout << "Hello World" << endl;
  } else {
    int a, b; cin >> a, b;
    cout << a + b << endl;
  }
}
#include <bits/stdc++.h>
#define ll long long
#define REP(i, n) for (ll (i) = 0; (i) < (n); (i)++)
#define REPI(i, a, b) for (ll (i) = (a); (i) < (b); (i)++)
#define int long long
using namespace std;
using II = pair<int, int>;
using VI = vector<int>;
using VVI = vector<VI>;
using VVVI = vector<VVI>;
const int MOD = 1e9 + 7;

signed main() {
  int N; cin >> N;
  if (N == 1) {
    cout << "Hello World" << endl;
  } else {
    int a, b; cin >> a >> b;
    cout << a + b << endl;
  }
}

Compiler output:
a.cc:32:11: error: redefinition of 'const long long int MOD'
   32 | const int MOD = 1e9 + 7;
      |           ^~~
a.cc:11:11: note: 'const long long int MOD' previously defined here
   11 | const int MOD = 1e9 + 7;
      |           ^~~
a.cc:34:8: error: redefinition of 'int main()'
   34 | signed main() {
      |        ^~~~
a.cc:13:8: note: 'int main()' previously defined here
   13 | signed main() {
      |        ^~~~
Language: C++

#include <iostream>

using namespace std;

int main()
{
  int N, M;
  cin >> N >> M;
  
  for (int i = 1; i * i <= M; i++) {
    if (M % i == 0) {
      int tmp = M / i;
      if (M / i >= N) ans = max(ans, i);
      if (M / tmp >= N) ans = max(ans, tmp);
    }
  }
  cout << ans << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:23: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |       if (M / i >= N) ans = max(ans, i);
      |                       ^~~
      |                       abs
a.cc:14:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |       if (M / tmp >= N) ans = max(ans, tmp);
      |                         ^~~
      |                         abs
a.cc:17:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   17 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

#include <iostream>

using namespace std;

int main()
{
  int N, M;
  cin >> N >> M;
  
  for (int i = 1; i*i <= M; i++) {
  	if (M % i == 0 && M / i >= N) {
      ans = i;
      return 0;
    }
  }
  cout << ans << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |       ans = i;
      |       ^~~
      |       abs
a.cc:16:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

#include <iostream>
int main(){
  int N;
 
  std::cin >> N;
  
  if (N == 1){
    std::cout << "Hello World" << std::endl;
    return 0;
  } else if (N == 2){
    std::cin >> a;
    std::sin >> b;
    std::cout << a+b << std::endl;
    return 0;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'a' was not declared in this scope
   11 |     std::cin >> a;
      |                 ^
a.cc:12:10: error: 'sin' is not a member of 'std'; did you mean 'min'?
   12 |     std::sin >> b;
      |          ^~~
      |          min
a.cc:12:17: error: 'b' was not declared in this scope
   12 |     std::sin >> b;
      |                 ^
Language: C++

#include <iostream>
int main(){
  int N;

  std::cin >> N;
  
  if (N == 1){
    std::cout << 'Hello World' << std::endl;
    return 0;
  } else if (N == 2){
    std::cin >> a;
    std::sin >> b;
    std::cout << a+b << std::endl;
    return 0;
  }
}

Compiler output:
a.cc:8:18: warning: multi-character literal with 11 characters exceeds 'int' size of 4 bytes
    8 |     std::cout << 'Hello World' << std::endl;
      |                  ^~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:11:17: error: 'a' was not declared in this scope
   11 |     std::cin >> a;
      |                 ^
a.cc:12:10: error: 'sin' is not a member of 'std'; did you mean 'min'?
   12 |     std::sin >> b;
      |          ^~~
      |          min
a.cc:12:17: error: 'b' was not declared in this scope
   12 |     std::sin >> b;
      |                 ^
Language: C

#include <stdio.h>

int main(){
	int N,T;
  	int i,j;
  	int C[100];
  	int Tt[100];
  	scanf("%d"&,N);
  	for(j = 0;j < N;j++){
  		scanf("%d",&C[j]);
    	scanf("%d",&Tt[j]);
    }
      
  	for(i = 0;i < N; i++){
    	if(Tt[i+1]<=Tt[0]){
        	if(C[i]>C[i+1]){
            	T = C[i+1];
             	
            }	
        }
      
    }
	printf("%d",T);
  	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:8:20: error: expected expression before ',' token
    8 |         scanf("%d"&,N);
      |                    ^
Language: C

#include <stdio.h>

int main(){

  int A,B,N;
  scanf("%d",&N);
  scanf("%d",&A);
  scanf("%d",&B);
  
  if(N==1){
  	printf("Hello,World!")
  }
  if(N==2){
  	printf("%d",A+B);
  }
  
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:31: error: expected ';' before '}' token
   11 |         printf("Hello,World!")
      |                               ^
      |                               ;
   12 |   }
      |   ~
Language: C

#include <stdio.h>

int main(){

  int A,B,N;
  scanf("%d",&N);
  scanf("%d",&A);
  scanf("%d",&B);
  
  if(N==1){
  	printf("Hello,World!")
  }
  if(N==2){
  	printf("%d",A+B);
  }
  

}

Compiler output:
main.c: In function 'main':
main.c:11:31: error: expected ';' before '}' token
   11 |         printf("Hello,World!")
      |                               ^
      |                               ;
   12 |   }
      |   ~
Language: C

#include <stdio.h>

int main(){

  int A,B,N;
  scanf("%d",&N);
  scanf("%d"&A);
  scanf("%d"&B);
  
  if(N==1){
  	printf("Hello,World!")
  }
  if(N==2){
  	printf("%d",A+B);
  }
  

}

Compiler output:
main.c: In function 'main':
main.c:7:13: error: invalid operands to binary & (have 'char *' and 'int')
    7 |   scanf("%d"&A);
      |         ~~~~^
      |         |
      |         char *
main.c:8:13: error: invalid operands to binary & (have 'char *' and 'int')
    8 |   scanf("%d"&B);
      |         ~~~~^
      |         |
      |         char *
main.c:11:31: error: expected ';' before '}' token
   11 |         printf("Hello,World!")
      |                               ^
      |                               ;
   12 |   }
      |   ~
Language: C

#include <stdio.h>

int main(){

  int A,B,N;
  scanf("%d",&N);
  scanf("%d","%d",&A,&B);
  if(N==1){
  	prinf("Hello,World!")
  }
  if(N==2){
  	printf("%d",A+B);
  }
  

}

Compiler output:
main.c: In function 'main':
main.c:9:9: error: implicit declaration of function 'prinf'; did you mean 'printf'? [-Wimplicit-function-declaration]
    9 |         prinf("Hello,World!")
      |         ^~~~~
      |         printf
main.c:9:30: error: expected ';' before '}' token
    9 |         prinf("Hello,World!")
      |                              ^
      |                              ;
   10 |   }
      |   ~
Language: C

#include <cmath>
#include <stdio.h>
int main(){
  int n,m;
  scanf("%d %d",&n,&m);
  int ans=1;
  for(int i=1;i<=sqrt(m);i++){
    if(m%i==0){
      if(i<=m/n)ans=max(ans,i);
      if(m/i<=m/n)ans=max(ans,m/i);
    }
  }
  printf("%d",ans);
  return 0;
}


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

#include <stdio.h>
#include <math.h>
int main(){
  int n,m;
  scanf("%d %d",&n,&m);
  int ans=1;
  for(int i=1;i<=sqrt(m);i++){
    if(m%i==0){
      if(i<=m/n)ans=max(ans,i);
      if(m/i<=m/n)ans=max(ans,m/i);
    }
  }
  printf("%d",ans);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:21: error: implicit declaration of function 'max'; did you mean 'fmax'? [-Wimplicit-function-declaration]
    9 |       if(i<=m/n)ans=max(ans,i);
      |                     ^~~
      |                     fmax
Language: C++

#include<iostream>
using namespace std;
int main()
{
    int n;
    int a,b;
    std::cin>>n;
    if(n==1)
        std::cout<<"Hello World"<<endl;
    else   
    {
        std::cin>>a>>>b;
        std::cout<<a+b<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: expected primary-expression before '>' token
   12 |         std::cin>>a>>>b;
      |                      ^
Language: Java

import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
  int n = sc.nextInt();
  if(n == 1)System.out.println("Hello World");
  else{
    int a = sc.nextInt();
    int b = sc.nextInt();
    Sytem.out.println(a+b);
  }
}}

Compiler output:
Main.java:10: error: package Sytem does not exist
    Sytem.out.println(a+b);
         ^
1 error
Language: C

#include<stdio.h>

int main(){
int a;
scanf("%d",&a);
if(a==1){
puts("Hello World");
}
else {
int b;
scanf("%d%d",&a,&b);
printf("%d",a+b);
}
return 0;
]

Compiler output:
main.c: In function 'main':
main.c:15:1: error: expected statement before ']' token
   15 | ]
      | ^
main.c:15:1: error: expected declaration or statement at end of input
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define repr(i,k,n) for(int i = (k); i < (n); i++)
#define rep(i,n) repr(i,0,n)
#define ALL(a) begin(a),end(a)
typedef vector<int> vi;
typedef vector<string> vs;
typedef long long ll;
const ll INF = 114514810;
const ll MOD = 1000000007;
int ctoi(const char c){
    switch(c){
    case '0': return 0;
    case '1': return 1;
    case '2': return 2;
    case '3': return 3;
    case '4': return 4;
    case '5': return 5;
    case '6': return 6;
    case '7': return 7;
    case '8': return 8;
    case '9': return 9;
  }
}
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N;
    cin >> N;
    if (N==1){
        cout << Hello World << endl;
    }else{
        int A, B;
        cin >> A >> B;
        cout << A+B << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:17: error: 'Hello' was not declared in this scope; did you mean 'ftello'?
   32 |         cout << Hello World << endl;
      |                 ^~~~~
      |                 ftello
a.cc: In function 'int ctoi(char)':
a.cc:24:1: warning: control reaches end of non-void function [-Wreturn-type]
   24 | }
      | ^
Language: C

#include <stdio.h>

int main() {
  
  int n,a,b;
  scanf("%d",&n);
  
  if(n==1){
    printf("Hello World");
  }
  
  if(n==2){
    scanf("%d %d", &a, &b);
    printf("%d %d, a+b);
  }
           
  printf("\n");
  return 0
}

Compiler output:
main.c: In function 'main':
main.c:14:12: warning: missing terminating " character
   14 |     printf("%d %d, a+b);
      |            ^
main.c:14:12: error: missing terminating " character
   14 |     printf("%d %d, a+b);
      |            ^~~~~~~~~~~~~
main.c:15:3: error: expected expression before '}' token
   15 |   }
      |   ^
main.c:14:12: error: expected ';' before '}' token
   14 |     printf("%d %d, a+b);
      |            ^
      |            ;
   15 |   }
      |   ~         
main.c:18:11: error: expected ';' before '}' token
   18 |   return 0
      |           ^
      |           ;
   19 | }
      | ~
Language: C++

#include <stdio.h>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   13 |     printf(A+B);
      |            ~^~
      |             |
      |             int
In file included from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

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

int a = 0;
cin >> a;
if (a == 1) {
  printf("Hello World");
} else {
  int b = 0;
  int x = 0;
  cin >> b >> x;
  cout << b + x;
}

Compiler output:
a.cc:6:1: error: 'cin' does not name a type
    6 | cin >> a;
      | ^~~
a.cc:7:1: error: expected unqualified-id before 'if'
    7 | if (a == 1) {
      | ^~
a.cc:9:3: error: expected unqualified-id before 'else'
    9 | } else {
      |   ^~~~
Language: C++

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

int a = 0;
cin >> a;
if (a == 1) {
  printf("Hello World");
} else {
  int b = 0;
  int x = 0;
  cin >> b >> x;
  printf("%d", b + x);
}

Compiler output:
a.cc:6:1: error: 'cin' does not name a type
    6 | cin >> a;
      | ^~~
a.cc:7:1: error: expected unqualified-id before 'if'
    7 | if (a == 1) {
      | ^~
a.cc:9:3: error: expected unqualified-id before 'else'
    9 | } else {
      |   ^~~~
Language: C++

if (input() == 1) {
  printf("Hello World");
} else {
  printf("%d", input() + input());
}

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'if'
    1 | if (input() == 1) {
      | ^~
a.cc:3:3: error: expected unqualified-id before 'else'
    3 | } else {
      |   ^~~~