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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: invalid operands of types 'double' and 'double' to binary 'operator%'
    8 |   if (a+b % 1.0 == 0){
      |         ~ ^ ~~~
      |         |   |
      |         |   double
      |         double
a.cc:11:11: error: expected '(' before '{' token
   11 |   else if {
      |           ^
      |           (
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: invalid operands of types 'double' and 'double' to binary 'operator%'
    8 |   if (a+b % 1.0 == 0){
      |         ~ ^ ~~~
      |         |   |
      |         |   double
      |         double
a.cc:11:11: error: expected '(' before '{' token
   11 |   else if {
      |           ^
      |           (
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: invalid operands of types 'double' and 'double' to binary 'operator%'
    8 |   if (a+b % 1.0 == 0){
      |         ~ ^ ~~~
      |         |   |
      |         |   double
      |         double
a.cc:11:11: error: expected '(' before '{' token
   11 |   else if {
      |           ^
      |           (
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: invalid operands of types 'double' and 'double' to binary 'operator%'
    8 |   if (a+b % 1.0 == 0){
      |         ~ ^ ~~~
      |         |   |
      |         |   double
      |         double
a.cc:11:11: error: expected '(' before '{' token
   11 |   else if {
      |           ^
      |           (
a.cc:13:4: error: expected '}' at end of input
   13 |   }
      |    ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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







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;
      |   ^~~
a.cc:14:3: error: 'cout' was not declared in this scope
   14 |   cout << y;
      |   ^~~~
Language: C++

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







Compiler output:
a.cc:1:1: warning: missing terminating " character
    1 | "include <bits/stdc++.h>
      | ^
a.cc:1:1: error: missing terminating " character
    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;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | "include <bits/stdc++.h>
a.cc:14:3: error: 'cout' was not declared in this scope
   14 |   cout << y;
      |   ^~~~
a.cc:14:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

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







Compiler output:
a.cc:1:1: warning: missing terminating " character
    1 | "include <bits/stdc++.h>
      | ^
a.cc:1:1: error: missing terminating " character
    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;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | "include <bits/stdc++.h>
a.cc:14:3: error: 'cout' was not declared in this scope
   14 |   cout << y;
      |   ^~~~
a.cc:14:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:13: error: expected '}' at end of input
   14 |   cout << y;
      |             ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: redeclaration of 'double X'
   11 |   double X= (a+b)/2;
      |          ^
a.cc:10:10: note: 'double X' previously declared here
   10 |   double X;
      |          ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: expected unqualified-id before '=' token
   11 |   double = (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: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() {
  int a,b;
  cin >> a >> b;
  cout<<(a+b+1)/2
}

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

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

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

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

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

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

int main(){
  int a,b;
  int c;

  std::cin >> a >> b;
  c = ((a+b)/2) % 10;

  std::cout << c << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: 'cin' is not a member of 'std'
    5 |   std::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 | int main(){
a.cc:8:8: error: 'cout' is not a member of 'std'
    8 |   std::cout << c << std::endl;
      |        ^~~~
a.cc:8:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:26: error: 'endl' is not a member of 'std'
    8 |   std::cout << c << std::endl;
      |                          ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | int main(){
Language: C++

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

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


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

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

int main() {
  int a, b;
  cin >> a >> b;
  x = (a + b)/2;
  int x;
 
  cout << x << 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;
      |   ^
Language: C++

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

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


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: expected ';' before 'double'
    6 |   cin >> a >> b
      |                ^
      |                ;
    7 |   double x = (a+b)/2
      |   ~~~~~~
Language: C++

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

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

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

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

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

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


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

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

Compiler output:
a.cc:2:3: error: 'cin' does not name a type
    2 |   cin>>a>>b;
      |   ^~~
a.cc:3:3: error: 'x' does not name a type
    3 |   x=(a+b+1)/2;
      |   ^
a.cc:4:3: error: 'cout' does not name a type
    4 |   cout<<x<<endl;
      |   ^~~~
Language: C++

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

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

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

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

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

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

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

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

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

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


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

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

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


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

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

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


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'n' was not declared in this scope; did you mean 'yn'?
    6 |     cin>>n>>m;
      |          ^
      |          yn
Language: C++

#include<iostream>
using namespace std;

int main(){
  int a,b;
  cout<<(a+b)/2<<len;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:18: error: 'len' was not declared in this scope; did you mean 'mblen'?
    6 |   cout<<(a+b)/2<<len;
      |                  ^~~
      |                  mblen
Language: C++

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

int main() {
  int a;

  cin >> a >> b;

  cout << (a+b)/2+((a+b)%2) << endl;
}


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

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

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


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

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

int main(){
  int a,b;
  cin >> a >> b;
  cout << (10*(a+b)+10)/10-1 << 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++>
using namespace std;

int main(){
  int a,b;
  cin >> a >> b;
  cout << (10*(a+b)+10)/10-1 << 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<iostream>
using namespace std;

int main(){
  int a, b, , sum;
  cin >> a >> b;
  sum = (a + b);
  cout << (sum + 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, , sum;
      |             ^
Language: C++

#include <bits/stdc++.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:7:22: error: expected ';' before 'cout'
    7 |   c = ceil(a + b / 2)
      |                      ^
      |                      ;
    8 |   cout << c << 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:12:4: error: expected '}' before 'else'
   12 |    else {
      |    ^~~~
a.cc:9:22: note: to match this '{'
    9 |    if ( (a+b)%2==0 ) {
      |                      ^
Language: C++

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

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


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

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

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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: expected unqualified-id before ';' token
    5 |   int a, b,;
      |            ^
a.cc:8:3: error: expected ',' or ';' before 'int'
    8 |   int s=t%2
      |   ^~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:21: error: 'b' was not declared in this scope
    6 |         scanf("%d",&b);
      |                     ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: expected '(' before 'a'
    7 |   if a % b == 0 {
      |      ^
      |      (
a.cc:10:3: error: 'else' without a previous 'if'
   10 |   else {
      |   ^~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: expected '(' before 'a'
    7 |   if a % b == 0 {
      |      ^
      |      (
a.cc:10:3: error: 'else' without a previous 'if'
   10 |   else {
      |   ^~~~
a.cc:11:5: error: 'n' was not declared in this scope
   11 |     n = a / b + 1;
      |     ^
a.cc:13:11: error: 'n' was not declared in this scope
   13 |   cout << n << endl;
      |           ^
Language: C++

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

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

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

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

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

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

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

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

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

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

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

    
    
  
  

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

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

  
  	

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

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

  

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

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

  

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

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

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


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:6: error: expected '(' before 'c'
    9 |   if c % 2 == 0;
      |      ^
      |      (
a.cc:11:3: error: 'else' without a previous 'if'
   11 |   else
      |   ^~~~
Language: C++

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

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



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

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

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


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

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

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


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

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

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


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

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

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


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

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

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


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

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

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


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

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

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


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

#include <isotream>

using namespace std;

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

}

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

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

int main(){

int a,b;
  
  cin >> a >> b;
  
  int x = a + b;
  if(x % 2 = !0){
    
    x++;
  }
  
  cout << x << endl;




}

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

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

int main(){

int a,b;
  
  cin >> a >> b;
  
  int x = a + b;
  if(x % 2 = !0){
    
    x++
  }
  
  cout << x << endl;




}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: lvalue required as left operand of assignment
   11 |   if(x % 2 = !0){
      |      ~~^~~
a.cc:13:8: error: expected ';' before '}' token
   13 |     x++
      |        ^
      |        ;
   14 |   }
      |   ~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:40: error: expected '}' at end of input
    8 |   cout << (int)((a + b) / 2.0) << 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 << int((a + b) / 2.0) << endl;

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

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

int main()
{
    double a,b;
    float ave;
    cin >> a >> b;
    
    ave = (a + b)/2;

   cout <<  round(ave * 100) / 100 << std::endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: 'round' was not declared in this scope
   13 |    cout <<  round(ave * 100) / 100 << std::endl;
      |             ^~~~~
Language: C++

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

int main()
{
    double a,b;
    float ave;
    cin >> a >> b;
    
    ave = (a + b)/2;

   cout <<  std::round(ave * 100) / 100 << std::endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:18: error: 'round' is not a member of 'std'
   13 |    cout <<  std::round(ave * 100) / 100 << std::endl;
      |                  ^~~~~
Language: C++

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

int main()
{
    double a,b;
    float ave;
    cin >> a >> b;
    
    ave = (a + b)/2;

    std::cout <<  std::round(ave * 100) / 100 << std::endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:24: error: 'round' is not a member of 'std'
   14 |     std::cout <<  std::round(ave * 100) / 100 << std::endl;
      |                        ^~~~~
Language: C++

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

int main()
{
    double a,b;
    float ave;
    cin >> a >> b;
    
    ave = (a + b)/2;

    std::cout << std::fixed << setprecision(1) << std::round(ave * 100) / 100 << std::endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:56: error: 'round' is not a member of 'std'
   14 |     std::cout << std::fixed << setprecision(1) << std::round(ave * 100) / 100 << std::endl;
      |                                                        ^~~~~
Language: C++

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

  cout << int (ceil(c)) << endl;
}

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

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

  cout << int(c) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'double'
    6 |   double c;
      |   ^~~~~~
a.cc:7:15: error: 'b' was not declared in this scope
    7 |   cin >> a >> b;
      |               ^
a.cc:8:3: error: 'c' was not declared in this scope
    8 |   c = (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: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;
  cin >> a >> b;
  cout ((a + b) * 2 + 1) / 2
}

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

#include<bits.stdc++>
using namespace;
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:1:9: fatal error: bits.stdc++: No such file or directory
    1 | #include<bits.stdc++>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
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:4:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 | cin >>a >> b;
      | ^~~
      | std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 | cout <<(a+b)/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:6:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 | 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:8:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 | 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:8:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 | 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<iostream>
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:4:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 | cin << a << b;
      | ^~~
      | std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 | cout >> (a+b)/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:6:19: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 | 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:8:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 | 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:8:19: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 | 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++.h>
using namespace std;

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

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:2: error: expected '}' at end of input
   15 | }
      |  ^
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, avg;
  cin >> a >> b;
  int avg = (a + b) /2;
  cout << ceil(avg) << endl;
}

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

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

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

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

#include <stdio.h>
#include <bits/stdc++.h>

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: expected ';' before 'cout'
   11 |     ans = a + b
      |                ^
      |                ;
   12 |     cout << ans / 2 + 1 << endl;
      |     ~~~~
Language: Java

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=0){
System.out.println((a+b)/2);
}else{
System.out.println((a+b)/2+1);
}
}
}

Compiler output:
Main.java:3: error: cannot find symbol
Scanner sc=new Scanner(System.in);
^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
Scanner sc=new Scanner(System.in);
               ^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: unexpected type
if((a+b)%2=0){
        ^
  required: variable
  found:    value
3 errors
Language: Java

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=0){
System.out.println((a+b)/2);
}else{
System.out.println((a+b)/2+1);
}
}

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

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

int main() {
  double A,B,x;
  int y;
  cin >> A >> B;
  x = (A + B) / 2;
  y = (x*10) % 10.0;
  y = y / y;
  cout << x + y << endl;
}

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

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

int main() {
  double A,B,x,y;
  cin >> A >> B;
  x = (A + B) / 2;
  y = (x*10.0) % 10.0;
  y = y / y;
  cout << x + y << endl;
}

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

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

int main() {
  double A,B,x,y;
  cin >> A >> B;
  x = (A + B) / 2;
  y = (x*10) % 10.0;
  y = y / y;
  cout << x + y << endl;
}

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

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

int main() {
  double A,B,x;
  int y;
  cin >> A >> B;
  x = (A + B) / 2;
  y = (x*10) % 10;
  y = y / y;
  cout << x + y << 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 |   y = (x*10) % 10;
      |       ~~~~~~ ^ ~~
      |         |      |
      |         double int
Language: C++

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

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

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

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

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


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

#include <iostream>
using namespace std;
int main()
{
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int a, b;
  cin>>a>>b;
  cout<<(a+b+1)/2
  return 0;
}

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

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

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






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

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

int main() {
  double a;
  double b;
  cin>>a;
  cin>>b;
  int d=(a+b)%2;
  int e;
  e=(a+b)/2+d;
  cout<<e<<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 |   int d=(a+b)%2;
      |         ~~~~~^~
      |           |   |
      |           |   int
      |           double
Language: C++

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

int main() {
  double a;
  double b;
  cin>>a;
  cin>>b;
  double d=(a+b)/2;
  int e=d%1;
  cout<<e<<endl;
}





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

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

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





Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: redeclaration of 'double d'
   10 |   double d=int d;
      |          ^
a.cc:9:10: note: 'double d' previously declared here
    9 |   double d=(a+b)/2;
      |          ^
a.cc:10:12: error: expected primary-expression before 'int'
   10 |   double d=int d;
      |            ^~~