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

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

int main() {
  int a, b;
  cin >> a >> b;
  cout << ((a + b) % 2 == 0) ? (a + b) / 2 : (a + b) / 2 + 1 << endl;
}


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

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

int main() {
  int a, b;
  cin >> a >> b;
  cout << ((a + b) % 2 == 0) ? (a + b) / 2 : (a + b) / 2 + 1 << end;
}


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

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

int main() {
  int a,b;
  cin >> a >>b;
  int cout
  cout << (a+b)/2 << endl;  
}

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

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

int main() {
  int a,b;
  text=(a+b)/2 
  cin >> a >>b;
  cout << (a+b)/2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'text' was not declared in this scope
    6 |   text=(a+b)/2
      |   ^~~~
Language: C++

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

int main() {
  int a, b,x ;
  cin >> a >> b >> x;
  cout << x=(a+b)/2 << endl; 
}

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

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

int main() {
  int a, b;
  cin >> a >> b;
  cout << (a+b)/2 << endl; 
  {  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:4: error: expected '}' at end of input
    8 |   {
      |   ~^
a.cc:8:4: error: expected '}' at end of input
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  int a, b;
  cin >> a >> b;
  cout << (a+b)/2 << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:7:27: error: expected '}' at end of input
    7 |   cout << (a+b)/2 << endl;
      |                           ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  int a,b;
  cin >> a >> b;
  cout << (a+b)/2 << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:7:27: error: expected '}' at end of input
    7 |   cout << (a+b)/2 << endl;
      |                           ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  int a,b,x;
  cin >> a >> b >> x;
  cout << x=(a+b)/2 << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    7 |   cout << x=(a+b)/2 << endl;
      |             ~~~~~~~~^~~~~~~
a.cc:7:29: error: expected '}' at end of input
    7 |   cout << x=(a+b)/2 << endl;
      |                             ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  int a, b;
  cin >> a >> b;
  cout << |(a+b) / 2| << endl;
}

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

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

int main() {
  int a, b, x;
  cin >> a >> b;
  cout << x= (a+b) / 2 << endl;
}

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

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

int main() {
  int a, b, x;
  cin >> a >> b;
  x = (a+b) / 2
  cout << x << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected ';' before 'cout'
    7 |   x = (a+b) / 2
      |                ^
      |                ;
    8 |   cout << x << endl;
      |   ~~~~
Language: C++

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

int main() {
  int a, b, x;
  cin >> a >> b >> x;
  x = (a+b) / 2
  cout << x << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected ';' before 'cout'
    7 |   x = (a+b) / 2
      |                ^
      |                ;
    8 |   cout << x << endl;
      |   ~~~~
Language: C++

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

int main() {
  int a, b, text;
  cin >> a >> b >> text;
  text = (a+b) / 2
  cout << text << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: expected ';' before 'cout'
    7 |   text = (a+b) / 2
      |                   ^
      |                   ;
    8 |   cout << text << endl;
      |   ~~~~
Language: C++

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

int main() {
  int a, b, text;
  cin >> a >> b >> x;
  text = (a+b) / 2
  cout << text << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: 'x' was not declared in this scope
    6 |   cin >> a >> b >> x;
      |                    ^
a.cc:7:19: error: expected ';' before 'cout'
    7 |   text = (a+b) / 2
      |                   ^
      |                   ;
    8 |   cout << text << endl;
      |   ~~~~
Language: Java

#include<iostream>
#include <algorithm>
#include <string>
#include<math.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
int main() {
    int a, b;
    cin >> a >> b ;
    cout << (a%b==0?a/b:a/b+1) << endl;
    return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include<iostream>
^
Main.java:2: error: illegal character: '#'
#include <algorithm>
^
Main.java:3: error: illegal character: '#'
#include <string>
^
Main.java:4: error: illegal character: '#'
#include<math.h>
^
Main.java:5: error: illegal character: '#'
#define rep(i,n)for(int i=0;i<n;i++)
^
Main.java:5: error: class, interface, enum, or record expected
#define rep(i,n)for(int i=0;i<n;i++)
                            ^
Main.java:5: error: class, interface, enum, or record expected
#define rep(i,n)for(int i=0;i<n;i++)
                                ^
Main.java:9: error: not a statement
    cin >> a >> b ;
             ^
Main.java:10: error: not a statement
    cout << (a%b==0?a/b:a/b+1) << endl;
                               ^
Main.java:7: error: unnamed classes are a preview feature and are disabled by default.
int main() {
^
  (use --enable-preview to enable unnamed classes)
10 errors
Language: C++

#include <iostream>
#include <algorithm>
 
using namespace std;
 
int main(){
  int a, b;
  cin >> a >> b;
  cout << (a + b) / 2 + (a + b) % 2 << endl
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:44: error: expected ';' before 'return'
    9 |   cout << (a + b) / 2 + (a + b) % 2 << endl
      |                                            ^
      |                                            ;
   10 |   return 0;
      |   ~~~~~~
Language: C++

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

int main(){
  int a , b;
  double x;
  cin >> a >> b;
  
  x = ( a + b ) / 2;
  x = ( x * 10) % 10;
  
  cout << (( a + b ) / 2) + (x * 2) << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   10 |   x = ( x * 10) % 10;
      |       ~~~~~~~~~ ^ ~~
      |           |       |
      |           double  int
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:27: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    7 |       int c = (a+b)/2+(((a%2)+(b%2))%2)/2;
      |                          ~^~
      |                          | |
      |                          | int
      |                          double
a.cc:7:33: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    7 |       int c = (a+b)/2+(((a%2)+(b%2))%2)/2;
      |                                ~^~
      |                                | |
      |                                | int
      |                                double
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:27: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    7 |       int c = (a+b)/2+(((a%2)+(b%2))%2)/2
      |                          ~^~
      |                          | |
      |                          | int
      |                          double
a.cc:7:33: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    7 |       int c = (a+b)/2+(((a%2)+(b%2))%2)/2
      |                                ~^~
      |                                | |
      |                                | int
      |                                double
Language: Java

import java.util.*;
import java.io.*;


public class At82 {
	public static void main(String[] args) {
		Scanner sc= new Scanner(System.in);
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		System.out.println(Math.ceil((a+b)/2.0));
		
	}
}


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

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

int main(){
  int A,B;
  cin >> A >> B;
  int X
    X=(A+B)/2
    cout << X << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected initializer before 'X'
    8 |     X=(A+B)/2
      |     ^
Language: C++

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

int main() {
  double a;
  double b;
  cin >> a;
  cin >> b;
  double x = (a+b)/2;
  int xx = x/1;
  if (x == xx){
  xx = xx+1
  }
  cout << xx << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: expected ';' before '}' token
   12 |   xx = xx+1
      |            ^
      |            ;
   13 |   }
      |   ~
Language: C++

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

int main() {
  double a;
  double b;
  cin >> a;
  cin >> b;
  double x = (a+b)/2;
  double xx = x%1000000;
  cout << xx << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   10 |   double xx = x%1000000;
      |               ~^~~~~~~~
      |               | |
      |               | int
      |               double
Language: C++

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

int main() {
  
  int a,b;
  cin >> a >> b;
  
  cout << ( a + b ) / 2 << endl;
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:9:33: error: expected '}' at end of input
    9 |   cout << ( a + b ) / 2 << endl;
      |                                 ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  int a,b;
    cin >> a,b;
  
  cout<<(10a+10b)/2/10<<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: unable to find numeric literal operator 'operator""a'
    8 |   cout<<(10a+10b)/2/10<<endl;
      |          ^~~
a.cc:8:14: error: unable to find numeric literal operator 'operator""b'
    8 |   cout<<(10a+10b)/2/10<<endl;
      |              ^~~
Language: C++

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

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

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

int main(){
    int a, b;
    cin >> a >> b;
    int x
    x=(a+b)/2
    cout << x << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected initializer before 'x'
    8 |     x=(a+b)/2
      |     ^
Language: C++

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

int main() {
  int a,b;
  cin>>a>>b;
  cout<<(a+b+1)/2<<endl
    
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:24: error: expected ';' before '}' token
    7 |   cout<<(a+b+1)/2<<endl
      |                        ^
      |                        ;
......
   10 | }
      | ~
Language: C++

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

int main() {
  
  int a,b,x;
  cin >> a >> b;
  
  int x = ceil( (a + b) / 2 );
  
  cout << x;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: redeclaration of 'int x'
    9 |   int x = ceil( (a + b) / 2 );
      |       ^
a.cc:6:11: note: 'int x' previously declared here
    6 |   int a,b,x;
      |           ^
Language: C++

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

int main(){
  int a, b, c;
  cin >> a >> b;
  c = a + b + (a + b) % 2
  cout << c / 2 << endl;
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: error: expected ';' before 'cout'
    7 |   c = a + b + (a + b) % 2
      |                          ^
      |                          ;
    8 |   cout << c / 2 << endl;
      |   ~~~~
Language: C++

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

int main() {
  int a, b;
  cin >> a >> b;
  
  X = (a + b) % 2;
  cout << (a + b) / 2 + X;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'X' was not declared in this scope
    8 |   X = (a + b) % 2;
      |   ^
Language: C++

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

double main() {
  double a, b;
  cin >> a >> b;
  
  int X = (a + b) % 2;
  cout << (a + b) / 2 + X;
}

Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | double main() {
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:8:19: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    8 |   int X = (a + b) % 2;
      |           ~~~~~~~ ^ ~
      |              |      |
      |              double int
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
  cin >> a;
  cin >> b;
  
  int c = a + b;
  
  if(c%2!=0){
  	c += 1; 
  }
  
  cout << c/2 << endl;
}

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

#include <string>
using namespace std;

int main() {
	int a, b;
	int c;
	cin >> a >> b;
	cout << (a + b - 1) / b << endl;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> a >> b;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <string>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:8:9: error: 'cout' was not declared in this scope
    8 |         cout << (a + b - 1) / b << endl;
      |         ^~~~
a.cc:8:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:36: error: 'endl' was not declared in this scope
    8 |         cout << (a + b - 1) / b << endl;
      |                                    ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <string>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: C++

#include <iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: expected ';' before 'c'
   12 |     cout c / 2 + 1 << endl;
      |         ^~
      |         ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  double a,b;
  cin >> a >> b;
  
  int x;
  x = (a+b)/2+0.5
    
  cout << x << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: expected ';' before 'cout'
    9 |   x = (a+b)/2+0.5
      |                  ^
      |                  ;
   10 | 
   11 |   cout << x << endl;
      |   ~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main ()
{
  double a,b;
  cin >> a >> b;
  
  int x;
  cout << x= (a+b)/2+0.5 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: invalid operands of types 'double' and '<unresolved overloaded function type>' to binary 'operator<<'
    9 |   cout << x= (a+b)/2+0.5 << endl;
      |              ~~~~~~~~~~~~^~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main ()
{
  double a,b;
  cin >> a >> b;
  
  int x;
  cout << x= (a+b)/2+0.5 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: invalid operands of types 'double' and '<unresolved overloaded function type>' to binary 'operator<<'
    9 |   cout << x= (a+b)/2+0.5 << endl;
      |              ~~~~~~~~~~~~^~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
 float a,b,S;
  cin >> a >> b;
  S = (a+b)/2 ;
 int s;
  s = S
  cout << s << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: expected ';' before 'cout'
    9 |   s = S
      |        ^
      |        ;
   10 |   cout << s << endl;
      |   ~~~~
Language: C++

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

int main() {
  int a, b, ;
  cin >> a >> b;
  cout << ( a + b + 1 ) / 2 << endl;
  return 0 ;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:5:13: error: expected unqualified-id before ';' token
    5 |   int a, b, ;
      |             ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int a,b;
  cin >> a >> b;
  int ansn = a+b;
  double ans = ansn/2;
  int ansl = ans*10;
  int anso = ans%10;
  if(anso >= 5 
     && anso <= 9){
    int ansm = (int)ans+1;
    ans = ansm;
  }
  cout << (int)ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   10 |   int anso = ans%10;
      |              ~~~^~~
      |              |   |
      |              |   int
      |              double
Language: C++

#include<iostream>
using namespace std;

int main(){
  int a,b;
  cin >> a >> b;
  int ansn = a+b;
  double ans = ansn/2;
  if(ans*10.0%10 >= 5 
     && ans*10.0%10 <= 9){
    int ansm = ans+1;
    ans = ansm;
  }
  cout << (int)ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    9 |   if(ans*10.0%10 >= 5
      |      ~~~~~~~~^~~
      |         |     |
      |         |     int
      |         double
a.cc:10:17: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   10 |      && ans*10.0%10 <= 9){
      |         ~~~~~~~~^~~
      |            |     |
      |            |     int
      |            double
Language: C++

#include<iostream>
using namespace std;

int main(){
  int a,b;
  cin >> a >> b;
  int ansn = a+b;
  double ans = ansn/2;
  if(ans*10%10 >= 5 && ans*10%10 <= 9){
    int ansm = ans+1;
    ans = ansm;
  }
  cout << (int)ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    9 |   if(ans*10%10 >= 5 && ans*10%10 <= 9){
      |      ~~~~~~^~~
      |         |   |
      |         |   int
      |         double
a.cc:9:30: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    9 |   if(ans*10%10 >= 5 && ans*10%10 <= 9){
      |                        ~~~~~~^~~
      |                           |   |
      |                           |   int
      |                           double
Language: C++

#include<iostream>
using namespace std;

int main(){
  int a,b;
  cin >> a >> b;
  double ans = (a+b)/2;
  if(ans*10%10 >= 5 && ans*10%10 <= 9){
    int ansm = ans+1;
    ans = ansm;
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    8 |   if(ans*10%10 >= 5 && ans*10%10 <= 9){
      |      ~~~~~~^~~
      |         |   |
      |         |   int
      |         double
a.cc:8:30: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    8 |   if(ans*10%10 >= 5 && ans*10%10 <= 9){
      |                        ~~~~~~^~~
      |                           |   |
      |                           |   int
      |                           double
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b;
  cin >> a >> b;
  double ave = (a+b)/2;
  int ave_int = ave
  cout << ave_int << endl;
}

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

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

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

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

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

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

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

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

#include<iostream>
using namespace std;

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:35: error: expected ';' before '}' token
    9 |     else cout << (a+b)/2+1 << endl
      |                                   ^
      |                                   ;
   10 | }
      | ~
Language: C++

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

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

#include <iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin >> a >> b;
      |   ^~~
a.cc:7:10: error: 'b' was not declared in this scope
    7 |   if( (a+b)%2 == 0 ) cout << (a+b)/2 << endl;
      |          ^
Language: Java

import java.util.*;
import java.lang.*;
 
public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int a = scan.nextInt();
      	int b = scan.nextInt();
      	double x = (a + b)/2;
      	System.out.print(int(Math.seil(x)));
    }
}

Compiler output:
Main.java:10: error: '.class' expected
      	System.out.print(int(Math.seil(x)));
      	                    ^
Main.java:10: error: ';' expected
      	System.out.print(int(Math.seil(x)));
      	                                 ^
2 errors
Language: Java

import java.util.*;
 
public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int a = scan.nextInt();
      	int b = scan.nextInt();
      	double x = (a + b)/2;
      	System.out.print(Math.seil(x));
    }
}

Compiler output:
Main.java:9: error: cannot find symbol
      	System.out.print(Math.seil(x));
      	                     ^
  symbol:   method seil(double)
  location: class Math
1 error
Language: C++

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

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


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:25: error: expected ';' before '}' token
   11 |     cout << mean << endl
      |                         ^
      |                         ;
   12 |   }
      |   ~
Language: C++

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

int main() {
  int a, b;
  cin >> a >> b;
  double (a+b)/2=c
  cout <<c<< endl;
}


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

#include <bits/stdc++.h>
2.using namespace std;
3.int main(){
4.  int a,b;
5.  cin>>a>>b;
6.  cout<<(a+b)/2+(a+b)%2<<endl;
}

Compiler output:
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2.using namespace std;
      | ^~~~~~~
a.cc:3:1: error: expected unqualified-id before numeric constant
    3 | 3.int main(){
      | ^~~~~
Language: C++

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

int main() {
  int a,b,e;
  double d;
  d = (a + b) / 2;
  e = (a + b) / 2;
  if(d - e = 0){
    cout << e << endl;
  }
  else{
    cout << e+1 << endl;
}


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    9 |   cout << c+(a+b)%2 << endl;
      |             ~~~~~^~
      |               |   |
      |               |   int
      |               double
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: expected ';' before 'cout'
    8 |   c=(a+b)/2
      |            ^
      |            ;
    9 |   cout << c << endl;
      |   ~~~~
Language: C++

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

int main() {
    int a, b;
    cin >> a >> b;
    int x;
    x = (a + b + 1)) / 2;
    cout << x << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: expected ';' before ')' token
    8 |     x = (a + b + 1)) / 2;
      |                    ^
      |                    ;
Language: C++

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

int main() {
    int a, b;
    cin >> a >> b;
    double mean;
    mean = ceil((a + b) / 2);
    x = int(mean);
    cout << x << endl;
    return 0;
}

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

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

int main() {
  double a, b;
  int mid;
  
  cin >> a >> b;
  if (a % 2 == 0 && b % 2 == 0){
     mid = (a + b) / 2;
  }
  else mid = (a + b) / 2 + 1;
  
  cout << mid << endl;
}


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

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

int main() {
  double a, b;
  int mid;
  
  cin >> a >> b;
  if (a % 2 == 0 && b % 2 == 0){
     mid = (a + b) / 2
  }
  else mid = (a + b) / 2 + 1;
  
  cout << mid << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    9 |   if (a % 2 == 0 && b % 2 == 0){
      |       ~ ^ ~
      |       |   |
      |       |   int
      |       double
a.cc:9:23: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    9 |   if (a % 2 == 0 && b % 2 == 0){
      |                     ~ ^ ~
      |                     |   |
      |                     |   int
      |                     double
a.cc:10:23: error: expected ';' before '}' token
   10 |      mid = (a + b) / 2
      |                       ^
      |                       ;
   11 |   }
      |   ~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:25: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    7 |   cout << (a+b+1-(a+b+1)%2)/2 <<endl;
      |                  ~~~~~~~^~
      |                      |   |
      |                      |   int
      |                      double
Language: C++

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

int main() {
  int a;
  int b;
  
  cin >> a >> b;
  
  cout << ( a + b + 1 ) / 2 << 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;

int main() {
  int a;
  int b;
  
  cin >> a >> b;
  
  cout << ( a + b + 1 ) / 2 << 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;
 
int main() {
  int a, b,c;
  cin >> a >> b;
  c = ( -a - b )/2
  cout << -c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: expected ';' before 'cout'
    7 |   c = ( -a - b )/2
      |                   ^
      |                   ;
    8 |   cout << -c << endl;
      |   ~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
int a,b;
  cin >>a >>b;
  cout (a+b+1)/2 <<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (int)'
    6 |   cout (a+b+1)/2 <<endl;
      |   ~~~~~^~~~~~~
Language: C++

include <iostream>
using namespace std;
int main(){
int a,b;
  cin >>a >>b;
  cout (a+b+1)/2 <<endl;
  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >>a >>b;
      |   ^~~
a.cc:6:3: error: 'cout' was not declared in this scope
    6 |   cout (a+b+1)/2 <<endl;
      |   ^~~~
a.cc:6:20: error: 'endl' was not declared in this scope
    6 |   cout (a+b+1)/2 <<endl;
      |                    ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main () {
  double a, b;
  cin >> a >> b;
  double ave = (a + b) / 2
  cout << ceil(ave) << endl;
  return 0;
}

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

#include<iostream>
#include<cmath>
#include<vector>
#include<set>
#include<algorithm>
#include<tuple>
#include<utility>
#include<cctype>
#include<climits>
#include<map>
#include<queue>
#include<functional>
 
using namespace std;
template<class T> void chmax(T& a, T b) {if(a < b){a=b;}}
template<class T> void chmin(T& a, T b) {if(a > b){a=b;}}
 
#define REP(i,a,n) for(int i=a;i<n;++i)
#define RUP(a,b) ((a+b-1)/(b))
#define ENT "\n"
#define REV(v) reverse(v.begin(),v.end())
#define SRT(v) sort(v.begin(),v.end())
#define MOD 1000000007
 
typedef long long ll;
typedef tuple<int,int,bool> Tb;


int abc104_c(){
    //入力
    int a,b;
	cin >> a >> b;
  
    //処理
  
    //出力
    cout << RUP(a+b,2) << enter;
    return 0;
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    abc104_c();
    return 0;
}


Compiler output:
a.cc: In function 'int abc104_c()':
a.cc:37:27: error: 'enter' was not declared in this scope; did you mean 'extern'?
   37 |     cout << RUP(a+b,2) << enter;
      |                           ^~~~~
      |                           extern
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:5:19: error: expected ';' before 'return'
    5 | printf("%d",a/b+1)
      |                   ^
      |                   ;
    6 | return 0;
      | ~~~~~~
Language: C++

#include<iostream>

int main(){
  double a,b;
  std::cin >> a >> b;
  std::cout << ceil((a+b)/2) << std::endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: 'ceil' was not declared in this scope
    6 |   std::cout << ceil((a+b)/2) << std::endl;
      |                ^~~~
Language: C++

#include<stdio.h>

int main() {
    int a, b;
    scanf_s("%d %d", &a, &b);

    int x = (a + b + 1) / 2;
    printf("%d", x);
    return 0;
}

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

#include <iostream>
using namespace std;

int main(){
  int a,b;
  cin >> a >> b;
  int x1=0;
  double x = 0;
  x1= (a+b)/2;
  x =(a+b)/2;
  double x2 = x-x1;
  if( x2 !<0.5) x1++;
  cout << x1;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: expected ')' before '!' token
   12 |   if( x2 !<0.5) x1++;
      |     ~   ^~
      |         )
Language: C++

#include <iostream
using namespace std;

int main(){
    int a, b;
    cin >> a >> b;
    int x = a*b;
    if(x%2==0) cout << x/2 << endl;
    else cout << x/2-0.5+1 << endl;
}

Compiler output:
a.cc:1:19: error: missing terminating > character
    1 | #include <iostream
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a, b, x;
  cin >> a >> b;
  x = ceil((a + b) / 2)
  cout << x << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:24: error: expected ';' before 'cout'
    7 |   x = ceil((a + b) / 2)
      |                        ^
      |                        ;
    8 |   cout << x << endl;
      |   ~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a, b;
  float x;
  cin >> a >> b;
  x = (a + b) / 2
  cout << ceil(x) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: expected ';' before 'cout'
    8 |   x = (a + b) / 2
      |                  ^
      |                  ;
    9 |   cout << ceil(x) << endl;
      |   ~~~~
Language: C++

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

int main() {
  int a, b;
  cin >> a >> b;
  cout << (a + b + 1) / 2 << endl;


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'x' was not declared in this scope
    7 |   x = ((a+b)%2)/2
      |   ^
a.cc:7:13: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    7 |   x = ((a+b)%2)/2
      |        ~~~~~^~
      |          |   |
      |          |   int
      |          double
Language: C++

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

int main() {
  int ,a b;
  cin >> a >> b;
  int aa = a % 2;
  int bb = b % 2;
  if(a == b) {
    cout << (a + b) / 2 << endl;
  } else {
    cout << (a + b + 1) / 2 << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: expected unqualified-id before ',' token
    5 |   int ,a b;
      |       ^
a.cc:5:10: 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++

import java.util.*;
import java.io.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        double a, b;
        a = Double.parseDouble(sc.next());
        b = Double.parseDouble(sc.next());

        int ans = (int)Math.ceil((a + b) / 2);
        System.out.println(ans);

        sc.close();
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.io.*;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class Main {
      | ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b,mean_i;
  double mean;
  
  cin >> a;
  cin >> b;
  
  mean_i = (a+b)/2;
  mean = (a+b)/2;
  
  if (mean-mean_i = 0.5){
    mean_i = mean_i+1;
  }
  
  cout << mean_i << endl;
}
    
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: lvalue required as left operand of assignment
   14 |   if (mean-mean_i = 0.5){
      |       ~~~~^~~~~~~
Language: C++

#includ <bits/stdc++.h>
using namespace std;
int main() {
  int a; int b;
  cin >> a >> b;
  cout << (a + b + 1) / 2 << endl;
}
  

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #includ; did you mean #include?
    1 | #includ <bits/stdc++.h>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> a >> b;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #includ <bits/stdc++.h>
a.cc:6:3: error: 'cout' was not declared in this scope
    6 |   cout << (a + b + 1) / 2 << endl;
      |   ^~~~
a.cc:6:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:6:30: error: 'endl' was not declared in this scope
    6 |   cout << (a + b + 1) / 2 << endl;
      |                              ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #includ <bits/stdc++.h>
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected ';' before 'e'
    7 |   d=(a+b)/2
      |            ^
      |            ;
    8 |   e=d-(a+b);
      |   ~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:13: error: redeclaration of 'int b'
    4 |   int a,b,c,b;
      |             ^
a.cc:4:9: note: 'int b' previously declared here
    4 |   int a,b,c,b;
      |         ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:13: error: redeclaration of 'int b'
    4 |   int a,b,c,b;
      |             ^
a.cc:4:9: note: 'int b' previously declared here
    4 |   int a,b,c,b;
      |         ^
a.cc:8:12: error: expected ';' before 'cout'
    8 |   c=e*2+a+b
      |            ^
      |            ;
    9 |   cout << c << endl;
      |   ~~~~
Language: C++

#include<iostream>
using namespace std;

int main()
{
  double a,b;
  cin >> a >> b;
  cout << (a+b)/2+(a+b)%2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    8 |   cout << (a+b)/2+(a+b)%2 << endl;
      |                   ~~~~~^~
      |                     |   |
      |                     |   int
      |                     double
Language: C++

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


int main()
{
	int a,b;
	cin >> a >> b;
	cout << ceil((a+b)/2)  << endl;
}

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

#include <iostream>
using namespace std;

int main() {
int a,b,x;
  cin >> a >> b;
  x = (a + b) *5;
  if(x % 10 >=5){
  for(x;x % == 0;x++;)
  {}
    cout << x  / 10 << endl;
  }else{
    for(x;x % 10 ==0;x--)
    {}
  cout << x /10 << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: expected primary-expression before '==' token
    9 |   for(x;x % == 0;x++;)
      |             ^~
a.cc:9:21: error: expected ')' before ';' token
    9 |   for(x;x % == 0;x++;)
      |      ~              ^
      |                     )
a.cc:9:22: error: expected primary-expression before ')' token
    9 |   for(x;x % == 0;x++;)
      |                      ^
Language: C++

#include <iostream>
using namespace std;

int main() {
int a,b,x;
  x = (a + b) *5;
  if(x % 10 >=5){
  cout (x + 1) / 10 << endl;
  }else{
  cout x /10 << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (int)'
    8 |   cout (x + 1) / 10 << endl;
      |   ~~~~~^~~~~~~
a.cc:10:7: error: expected ';' before 'x'
   10 |   cout x /10 << endl;
      |       ^~
      |       ;
Language: C++

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

int main(void){
  int x,y
  cin >>  x >> y;
  cout << (x+y+1)/2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected initializer before 'cin'
    7 |   cin >>  x >> y;
      |   ^~~
a.cc:8:14: error: 'y' was not declared in this scope
    8 |   cout << (x+y+1)/2 << endl;
      |              ^
Language: C++

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

int main(){
  int a,b;
  
  cin >> a >> b ;
  
  cout >> (a+B)/2+1 >> endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'B' was not declared in this scope
    9 |   cout >> (a+B)/2+1 >> endl;
      |              ^
Language: C++

#include <iostream>
using namespace std;
 int a,b,x;

int main() {
    cin >> a >> b;
    if ((a+b) % 2 == 0){x=(a+b)/2}
    else{x=(a+b+1)/2}
    cout << x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:34: error: expected ';' before '}' token
    7 |     if ((a+b) % 2 == 0){x=(a+b)/2}
      |                                  ^
      |                                  ;
a.cc:8:21: error: expected ';' before '}' token
    8 |     else{x=(a+b+1)/2}
      |                     ^
      |                     ;
Language: C++

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

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


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

#include<iostream>
useing namespace std;

int main(){
	int a=0,b=0;
  	if((a+b)%2==0) cout << (a+b)/2 <<endl;
  	else cout <<(a+b)/2+1 <<endl;	


}

Compiler output:
a.cc:2:1: error: 'useing' does not name a type
    2 | useing namespace std;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:6:24: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |         if((a+b)%2==0) cout << (a+b)/2 <<endl;
      |                        ^~~~
      |                        std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:6:42: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |         if((a+b)%2==0) cout << (a+b)/2 <<endl;
      |                                          ^~~~
      |                                          std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:7:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |         else cout <<(a+b)/2+1 <<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:33: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |         else cout <<(a+b)/2+1 <<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++>
using namespace std;

int main() {
  int a, b;
  cin >> a >> b;
  cout << (a + b) / 2 << endl;
}
  

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