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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: expected primary-expression before '/' token
    7 |   if (a+b)/2 == int{
      |           ^
a.cc:8:25: error: invalid user-defined conversion from 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} to 'int' [-fpermissive]
    8 |         cout << (a+b)/2 << endl;
      |         ~~~~~~~~~~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/istream:40,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_ios.h:121:16: note: candidate is: 'std::basic_ios<_CharT, _Traits>::operator bool() const [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
  121 |       explicit operator bool() const
      |                ^~~~~~~~
/usr/include/c++/14/bits/basic_ios.h:121:16: note:   return type 'bool' of explicit conversion function cannot be converted to 'int' with a qualification conversion
a.cc:7:17: error: expected primary-expression before 'int'
    7 |   if (a+b)/2 == int{
      |                 ^~~
a.cc:10:28: error: expected ';' before '}' token
   10 |         cout << (a+b)/2 + 1
      |                            ^
      |                            ;
   11 |   }
      |   ~
Language: C++

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

Compiler output:
a.cc: In function 'int mian()':
a.cc:5:1: warning: no return statement in function returning non-void [-Wreturn-type]
    5 | }
      | ^
/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 mian(){
  int a, b;cin>>a>>b;cout<<(a+b-1)/b<<endl;
}

Compiler output:
a.cc: In function 'int mian()':
a.cc:5:1: warning: no return statement in function returning non-void [-Wreturn-type]
    5 | }
      | ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:22: error: expected ';' before '{' token
   11 |   }else(a/b == c / d){
      |                      ^
      |                      ;
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:22: error: expected ';' before '{' token
   10 |   }else(a/b == c / d){
      |                      ^
      |                      ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int a, b, answer;
  cin >> a >> b;
  sum = a + b;
  if(sum % 2 == 1)	//2で割り切れる場合は1を加える
  {
    sum += 1;
  }
  cout << sum / 2 << endl;
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int a, b, answer;
  cin >> a >> b;
  sum = a + b;
  if(sum % 2 == 1)	//2で割り切れる場合は1を加える
  {
    answer += 1;
  }
  cout << sum / 2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'sum' was not declared in this scope
    7 |   sum = a + b;
      |   ^~~
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 + x % 2;
  
  cout << x << endl;
  
}


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

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

int main() {
  //定義
  int a, b;  //平均の素材　小数点なし
  int ave;   //小数点なしの平均
  double aa,bb; //平均の素材　小数点あり
  double aveave;//小数点ありの平均
  //入力
  cin >> a >> b;
  
  //計算
  ave=(a+b)/2;
  aveave=(aa+bb)/2
 
  //判定＆表示
  if(ave=!aveave)
  {
    cout << ave+1 << endl;
  }
  else
  {
    cout << ave << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:19: error: expected ';' before 'if'
   15 |   aveave=(aa+bb)/2
      |                   ^
      |                   ;
......
   18 |   if(ave=!aveave)
      |   ~~               
a.cc:22:3: error: 'else' without a previous 'if'
   22 |   else
      |   ^~~~
Language: C++

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


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

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

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

#include<stdio.h>
int main(void){
    int a,b,c;
    scnaf("%d %d",&a ,&b);
    c=(a+b)/2;
    printf("%d\n",c);
    return 0;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:16: error: expected primary-expression before '%' token
    4 |     scanf("&a",%d);
      |                ^
a.cc:4:17: error: 'd' was not declared in this scope
    4 |     scanf("&a",%d);
      |                 ^
a.cc:5:16: error: expected primary-expression before '%' token
    5 |     scanf("&b",%d);
      |                ^
Language: C++

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


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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: expected ';' before 'int'
    6 |   cin>>a,b
      |           ^
      |           ;
    7 |   int x = (a+b)/2;
      |   ~~~      
a.cc:10:12: error: 'x' was not declared in this scope
   10 |     cout<< x <<endl;
      |            ^
a.cc:13:10: error: 'x' was not declared in this scope
   13 |   cout<< x+1 <<endl;
      |          ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected ',' or ';' before 'if'
    9 |     if((a+b)%2 == 0){
      |     ^~
a.cc:12:3: error: 'else' without a previous 'if'
   12 |   else{
      |   ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(void){
  
  int a, b, ans;
  double x;
  
  cin >> a >> b;
  
  x = (a + b)/2;
  
  ans = x;
  if(x%1 > 0) ans++;
  
  cout << ans << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   13 |   if(x%1 > 0) ans++;
      |      ~^~
      |      | |
      |      | int
      |      double
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: expected ';' before 'int'
   10 |   c = a + b * 1/2
      |                  ^
      |                  ;
   11 | 
   12 |   int x1;
      |   ~~~             
a.cc:13:10: error: 'x1' was not declared in this scope; did you mean 'y1'?
   13 |   cin >> x1;
      |          ^~
      |          y1
a.cc:20:6: error: 'x' was not declared in this scope; did you mean 'x2'?
   20 |   if(x ==c){
      |      ^
      |      x2
a.cc:23:16: error: expected ')' before 'x1'
   23 |   else if(x <=c x1){
      |          ~     ^~~
      |                )
a.cc:26:14: error: expected primary-expression before '>' token
   26 |   else if(x =>c x2){
      |              ^
a.cc:26:16: error: expected ')' before 'x2'
   26 |   else if(x =>c x2){
      |          ~     ^~~
      |                )
a.cc:28:4: error: expected '}' at end of input
   28 |   }
      |    ^
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+1)<<endl;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin>>a>>b;
      |   ^~~
a.cc:8:17: error: 'cout' was not declared in this scope
    8 |   if((a+b)%2==0)cout<<(a+b)/2<<endl;
      |                 ^~~~
a.cc:8:32: error: 'endl' was not declared in this scope
    8 |   if((a+b)%2==0)cout<<(a+b)/2<<endl;
      |                                ^~~~
a.cc:9:8: error: 'cout' was not declared in this scope
    9 |   else cout<<(a+b+1)<<endl;
      |        ^~~~
a.cc:9:23: error: 'endl' was not declared in this scope
    9 |   else cout<<(a+b+1)<<endl;
      |                       ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |         ans=c/2;
      |         ^~~
      |         abs
a.cc:11:10: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |     else ans=(c/2)+1;
      |          ^~~
      |          abs
a.cc:12:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |     cout<<ans;
      |           ^~~
      |           abs
Language: C++

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

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


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

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

int main() {
  double a, b;
  
  x = (a + b) * 0.5;
  int X = x;
  double Y = x - X;
  int z = x + Y;
   
  cin >> a >> b;  
  cout << z << 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) * 0.5;
      |   ^
Language: C++

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

int main() {
  double a, b;
  
  x = (a + b) * 0.5;
  int X = x;
  Y = x - X;
  int z = x + Y;
   
  cin >> a >> b;  
  cout << z << 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) * 0.5;
      |   ^
a.cc:9:3: error: 'Y' was not declared in this scope
    9 |   Y = x - X;
      |   ^
Language: C++

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

int main() {
  double a, b;
  
  cin >> a >> b;
  
  x = (a + b) * 0.5;
  int X = x;
  Y = x - X;
  int z = x + Y;
    
  cout << z << endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'x' was not declared in this scope
    9 |   x = (a + b) * 0.5;
      |   ^
a.cc:11:3: error: 'Y' was not declared in this scope
   11 |   Y = x - X;
      |   ^
Language: C++

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

int main() {
  double a, b;
  
  cin >> a >> b;
  
  x = (a + b) * 0.5;
  int X = x;
  Y = x - X;
  int z = x + Y
    
  cout << z << endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'x' was not declared in this scope
    9 |   x = (a + b) * 0.5;
      |   ^
a.cc:11:3: error: 'Y' was not declared in this scope
   11 |   Y = x - X;
      |   ^
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:12: 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;
  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:12: error: lvalue required as left operand of assignment
    7 |   if ((a+b)%2=1){
      |       ~~~~~^~
a.cc:8:32: error: expected ')' before ';' token
    8 |     (cout << (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+1)/2<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: expected initializer before '>>' token
    5 |   int a>>b;
      |        ^~
a.cc:6:10: error: 'a' was not declared in this scope
    6 |   cin >> a,b;
      |          ^
a.cc:6:12: error: 'b' was not declared in this scope
    6 |   cin >> a,b;
      |            ^
Language: C++

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

int main(){
  double A, B, C;
  int inC;
  
  cin >> A >> B;
  C = A + B / 2.0
  inC = C;
  if(inC < C){
    C = C + 1;
  }
  cout << C << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: expected ';' before 'inC'
    9 |   C = A + B / 2.0
      |                  ^
      |                  ;
   10 |   inC = C;
      |   ~~~
Language: C++

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

int main(){
  double A, B, C;
  int inC;
  
  cin >> A >> B;
  C = A + B / 2.0
  inC = C;
  if(inC < C){
    C = C + 1;
  }
  cout << C << endl;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope
    8 |   cin >> A >> B;
      |   ^~~
a.cc:9:18: error: expected ';' before 'inC'
    9 |   C = A + B / 2.0
      |                  ^
      |                  ;
   10 |   inC = C;
      |   ~~~             
a.cc:14:3: error: 'cout' was not declared in this scope
   14 |   cout << C << endl;
      |   ^~~~
a.cc:14:16: error: 'endl' was not declared in this scope
   14 |   cout << C << endl;
      |                ^~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: expected ';' before 'cout'
   10 |   c=x+0.9
      |          ^
      |          ;
   11 |   cout << c << endl;
      |   ~~~~
Language: C++

#include <iostream>
using namespace std;

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


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

#include <bits/stdc++.h>
 
int main() {
  int x,a,b;
  cin >> a >> b ;
  x = (a+b+1) / 2 ;
  std::cout << x << '\n';
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> a >> b ;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include <bits/stdc++.h>
 
int main() {
  int x,a,b;
  cin >> a >> b ;
  x = (a+b)/2.0 + 0.5;
  std::cout << x << '\n';
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> a >> b ;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

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

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

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

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

int main() {
	int s1s2s3 , s1 , s2 , s3;
	cin >> s1s2s3 >> s1 >> s2 >> s3;
		s1 = s1s2s3 / 100
		s2 = ( s1s2s3 - s1 * 100 ) /10
		s3 = s1s2s3 - s1 * 100 - s2 * 10
  		cout << s1 + s2 + s3 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:34: error: expected ';' before 's2'
    7 |                 s1 = s1s2s3 / 100
      |                                  ^
      |                                  ;
    8 |                 s2 = ( s1s2s3 - s1 * 100 ) /10
      |                 ~~
Language: C++

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

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


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

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

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


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

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

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


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

#include<iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: expected ';' before 'if'
    7 |    k = (a+b)/2
      |               ^
      |               ;
    8 |    if((a+b)%2==0){
      |    ~~          
a.cc:11:4: error: 'else' without a previous 'if'
   11 |    else {
      |    ^~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
	int i,j;
	cin>>i>>j;
	cout<(i+j+1)/2<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:23: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    6 |         cout<(i+j+1)/2<<endl;
      |              ~~~~~~~~~^~~~~~
Language: C++

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

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


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

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

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

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

#include <iostream>
using namespace std;

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

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

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

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

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

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

Compiler output:
Main.java:7: error: '.class' expected
      if( (a+b)/2 == double(a+b)/2) System.out.println((a+b)/2);
                           ^
Main.java:7: error: not a statement
      if( (a+b)/2 == double(a+b)/2) System.out.println((a+b)/2);
                                ^
Main.java:7: error: ';' expected
      if( (a+b)/2 == double(a+b)/2) System.out.println((a+b)/2);
                                  ^
Main.java:8: error: 'else' without 'if'
      else System.out.println((a+b)/2 + 1);
      ^
4 errors
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:16: error: 'B' was not declared in this scope
    7 |   cout << (a + B) / 2 << endl;
      |                ^
Language: C++

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

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

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

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

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

}

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: expected ';' before 'cout'
   10 |   C = (A+B)/2 + 1/2
      |                    ^
      |                    ;
   11 | 
   12 |   cout << C << endl;
      |   ~~~~
Language: C++

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

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

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

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

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


Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namesapce'
    2 | using namesapce std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |     cin >> a >> b;
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

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

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

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namesapce'
    2 | using namesapce std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |     cin >> a >> b;
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:15: error: expected ';' before '}' token
    8 |     c= (a+b)/2
      |               ^
      |               ;
    9 |     }else{
      |     ~          
a.cc:10:16: error: expected ';' before '}' token
   10 |     c=(a+b)/2+1
      |                ^
      |                ;
   11 |     }
      |     ~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: expected initializer before 'c'
    5 |   int a, b c;
      |            ^
a.cc:6:15: error: 'b' was not declared in this scope
    6 |   cin >> a >> b ;
      |               ^
a.cc:7:3: error: 'c' was not declared in this scope
    7 |   c = (a + b)*5;
      |   ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: expected initializer before 'c'
    5 |   int a, b c;
      |            ^
a.cc:6:15: error: 'b' was not declared in this scope
    6 |   cin >> a >> b ;
      |               ^
a.cc:7:3: error: 'c' was not declared in this scope
    7 |   c = (a + b)*5
      |   ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: expected ';' before 'cout'
    8 |   sum = a + b
      |              ^
      |              ;
    9 |   cout << sum / 2 + sum % 2 << 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:6:15: error: expected ';' before 'cout'
    6 |  cin >> a >> b
      |               ^
      |               ;
    7 |  cout << (a + b + 1) / 2 << endl;
      |  ~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:18: error: expected ';' before 'cin'
    6 |       1<=a,b<=100
      |                  ^
      |                  ;
    7 |       cin >> a >> b;
      |       ~~~         
a.cc:8:12: error: expected ';' before 'if'
    8 |       c=a+b
      |            ^
      |            ;
    9 |       if(c%2!=0){
      |       ~~
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include <cmath>
#include <cstdio>
 
using namespace std;
 
int main()
{
    double a, b;
    if (scanf("%lf%lf", &a, &b) < 2) return 0;
 
    int ans = (int)ceil((a + b) / 2);
 
    printf("%d\n", ans);
    ret

Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'ret' was not declared in this scope
   15 |     ret
      |     ^~~
a.cc:15:8: error: expected '}' at end of input
   15 |     ret
      |        ^
a.cc:8:1: note: to match this '{'
    8 | {
      | ^
Language: C++

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:29: 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 <bits/stdc++.h>
using namespace std;
 
int main(){
  double a,b;
  1 <= a,b && a,b <= 100 ;
  cin >> a >> b;
  cout << a * b / 2 + a % b * 2 << endl;
}

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

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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: expected primary-expression before '|' token
    7 |   int c = |(a + b) / 2|;
      |           ^
a.cc:7:24: error: expected primary-expression before ';' token
    7 |   int c = |(a + b) / 2|;
      |                        ^
Language: C++

#include <bits/stdc++/h>
using namespace std;
int main(void){
    int a,b;
    cin >>a>>b;
    cout << (a+b)/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 namepace std;

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


Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namepace'
    2 | using namepace std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >>a;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |   cout <<(a+b+1)/2<<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:9:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |   cout <<(a+b+1)/2<<endl;
      |                     ^~~~
      |                     std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

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


Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namepace'
    2 | using namepace std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >>a;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |   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:9:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |   cout <<((a+b)/2)+1<<endl;
      |                       ^~~~
      |                       std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

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


Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namepace'
    2 | using namepace std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >>a;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |   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:9:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |   cout <<(a+b)/2+1<<endl;
      |                     ^~~~
      |                     std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

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


Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namepace'
    2 | using namepace std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >>a;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |   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:9:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |   cout <<(a+b)/2+1<<endl;
      |                     ^~~~
      |                     std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected '}' before 'else'
    9 |   else
      |   ^~~~
a.cc:7:17: note: to match this '{'
    7 |   if((a+b)%2==0){
      |                 ^
a.cc: At global scope:
a.cc:12:3: error: 'cout' does not name a type
   12 |   cout << a+b << endl;
      |   ^~~~
a.cc:13:1: error: expected declaration before '}' token
   13 | }
      | ^
Language: C++

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

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

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

int main() {
  // ここにプログラムを追記
  int a, b, c;
  cin >> a >> b;
  c = ceil((a + b) / 2)
  cout << c << endl;
}

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

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
 
int main() {
  // ここにプログラムを追記
  int a, b, c
  cin >> a >> b;
  c = int(ceil((a + b) / 2));
  cout << c << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected initializer before 'cin'
    8 |   cin >> a >> b;
      |   ^~~
a.cc:9:3: error: 'c' was not declared in this scope
    9 |   c = int(ceil((a + b) / 2));
      |   ^
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
 
int main() {
  // ここにプログラムを追記
  int a, b
  float c;
  cin >> a >> b;
  c = mean(a, b);
  cout << ceil(c) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected initializer before 'float'
    8 |   float c;
      |   ^~~~~
a.cc:9:15: error: 'b' was not declared in this scope
    9 |   cin >> a >> b;
      |               ^
a.cc:10:3: error: 'c' was not declared in this scope
   10 |   c = mean(a, b);
      |   ^
a.cc:10:7: error: 'mean' was not declared in this scope
   10 |   c = mean(a, b);
      |       ^~~~
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
 
int main() {
  // ここにプログラムを追記
  int a, b
  float c;
  cin >> a >> b;
  c = mean(a, b)
  cout << ceil(c) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected initializer before 'float'
    8 |   float c;
      |   ^~~~~
a.cc:9:15: error: 'b' was not declared in this scope
    9 |   cin >> a >> b;
      |               ^
a.cc:10:3: error: 'c' was not declared in this scope
   10 |   c = mean(a, b)
      |   ^
a.cc:10:7: error: 'mean' was not declared in this scope
   10 |   c = mean(a, b)
      |       ^~~~
Language: C++

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

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

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

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

#include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <istream>
#define rep0(i,n) for (int i = 0; i <= (n); ++i)
#define rep1(i,n) for (int i = 1; i <= (n); ++i)
#define vec vector<int>a(n)
#define soot(a) sort(a.begin(),a.end())
/*int n;
cin >> n;
vector<int>a(n);
rep0(i, n - 1)cin >> a[i];*/
using namespace std;
int main() {
	int a,b;
  cin>>a>>b;
  float ans = a+b/2;
  if(ans%1==0)
    cout<<ans<<endl;
  else
    cout<<ans+1<<endl;
  return 0;
}


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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b,c;
  double d,ave;
  cin >> a >> b;
  ave = (a + b)/2.0;
  d=ave%1.0;
    if (d!=0){
      c>ave;
      c<ave+1.0;
    }
  else{
    c=ave;
  }
  cout << c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: invalid operands of types 'double' and 'double' to binary 'operator%'
    9 |   d=ave%1.0;
      |     ~~~^~~~
      |     |   |
      |     |   double
      |     double
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b,c;
  double ave;
  cin >> a >> b;
  ave = (a + b)/2.0;
    if (ave%1.0!=0.0){
      c>ave;
      c<ave+1.0;
    }
  else{
    c=ave;
  }
  cout << c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: invalid operands of types 'double' and 'double' to binary 'operator%'
    9 |     if (ave%1.0!=0.0){
      |         ~~~^~~~
      |         |   |
      |         |   double
      |         double
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b,c;
  double ave;
  cin >> a >> b;
  ave = (a + b)/2.0;
    if (ave%1!=0){
      c>ave;
      c<ave+1.0;
    }
  else{
    c=ave;
  }
  cout << c << 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 (ave%1!=0){
      |         ~~~^~
      |         |   |
      |         |   int
      |         double
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: expected ';' before 'if'
    8 |   ave = (a + b)/2.0
      |                    ^
      |                    ;
    9 |     if (ave%1!=0){
      |     ~~              
a.cc:13:3: error: 'else' without a previous 'if'
   13 |   else{
      |   ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected initializer before 'cin'
    7 |   cin >> a >> b;
      |   ^~~
a.cc:8:3: error: 'ave' was not declared in this scope
    8 |   ave = (a + b)/2.0
      |   ^~~
a.cc:13:3: error: 'else' without a previous 'if'
   13 |   else{
      |   ^~~~
Language: C++

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

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

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

#include <bits/stdc++.h>

using namespace std;

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

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

#include <iostream>
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:34: 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() {
  int a,b ;
  cin >> a >> b ;
  int x = a+b;
  
  cout << c/2 + c%2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: 'c' was not declared in this scope
    9 |   cout << c/2 + c%2 << endl;
      |           ^