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

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

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

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

	x =  (a + b) / 2 + 0.5;

	cout << x << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> a >> b;
      |         ^~~
a.cc:8:9: error: 'cout' was not declared in this scope
    8 |         cout << x << endl;
      |         ^~~~
a.cc:8:22: error: 'endl' was not declared in this scope
    8 |         cout << x << endl;
      |                      ^~~~
Language: C++

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

	x =  (a + b) / 2 + 0.5;

	cout << x << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'cin' was not declared in this scope
    3 |         cin >> a >> b;
      |         ^~~
a.cc:7:9: error: 'cout' was not declared in this scope
    7 |         cout << x << endl;
      |         ^~~~
a.cc:7:22: error: 'endl' was not declared in this scope
    7 |         cout << x << endl;
      |                      ^~~~
Language: C++

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

	x = ((a + a % 2) + (b + b % 2)) / 2;

	cout << x << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'cin' was not declared in this scope
    3 |         cin >> a >> b;
      |         ^~~
a.cc:7:9: error: 'cout' was not declared in this scope
    7 |         cout << x << endl;
      |         ^~~~
a.cc:7:22: error: 'endl' was not declared in this scope
    7 |         cout << x << endl;
      |                      ^~~~
Language: C++

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

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


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

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

int main() {
  int a,b,r;
  cin >> a >> b;
  sum = a + b;
  if(sum%2==0){
    r=sum/2;
  }else{
    r=sum/2+1;
  }
  cout << r << 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;
  cin >> a >> b;
  sum = a + b;
  if(sum%2==0){
    r=sum/2;
  }else{
    r=sum/2+1;
  }
  cout << r << 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;
      |   ^~~
a.cc:9:5: error: 'r' was not declared in this scope
    9 |     r=sum/2;
      |     ^
a.cc:11:5: error: 'r' was not declared in this scope
   11 |     r=sum/2+1;
      |     ^
a.cc:13:11: error: 'r' was not declared in this scope
   13 |   cout << r << endl;
      |           ^
Language: C++

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

int main() {
  int a,b;
  cin >> a >> b;
  sum = a + b;
  if(sum%2==0){r=sum/2;}
  else(r=sum/2+1;)
  cout << r << 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;
      |   ^~~
a.cc:8:16: error: 'r' was not declared in this scope
    8 |   if(sum%2==0){r=sum/2;}
      |                ^
a.cc:9:8: error: 'r' was not declared in this scope
    9 |   else(r=sum/2+1;)
      |        ^
a.cc:9:17: error: expected ')' before ';' token
    9 |   else(r=sum/2+1;)
      |       ~         ^
      |                 )
a.cc:9:18: error: expected primary-expression before ')' token
    9 |   else(r=sum/2+1;)
      |                  ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected initializer before 'n'
    7 |   n = (a+b)%2
      |   ^
a.cc:9:7: error: 'n' was not declared in this scope
    9 |   if (n<0.5){
      |       ^
Language: C++

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

int main(){

double A,B;
cin>>A;
cin>>B;

double x;
x=(A+B)/2;

if(x%10==0){cout<<x<<endl;}
else {cout<<x+0.5<<endl;}



}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   13 | if(x%10==0){cout<<x<<endl;}
      |    ~^~~
      |    | |
      |    | int
      |    double
Language: C++

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

int main(){

int A,B;
cin>>A;
cin>>B;

double x;
x=(A+B)/2;

if(x%10==0){cout<<x<<endl;}
else {cout<<x+0.5<<endl;}



}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   13 | if(x%10==0){cout<<x<<endl;}
      |    ~^~~
      |    | |
      |    | int
      |    double
Language: C++

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

int main(){

int A,B;
cin>>A;
cin>>B;

double x;
x=(A+B)/2;

if(x%10==0){cout<<x<<endl;}
else if{cout<<x+1<<endl;}



}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   13 | if(x%10==0){cout<<x<<endl;}
      |    ~^~~
      |    | |
      |    | int
      |    double
a.cc:14:8: error: expected '(' before '{' token
   14 | else if{cout<<x+1<<endl;}
      |        ^
      |        (
Language: C++

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

int main(){

int A,B;
cin>>A;
cin>>B;

int x
x=(A+B)/2;

if(x%10==0){cout<<x<<endl;}
else if{cout<<x+1<<endl;}



}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:1: error: expected initializer before 'x'
   11 | x=(A+B)/2;
      | ^
a.cc:13:4: error: 'x' was not declared in this scope
   13 | if(x%10==0){cout<<x<<endl;}
      |    ^
a.cc:14:8: error: expected '(' before '{' token
   14 | else if{cout<<x+1<<endl;}
      |        ^
      |        (
Language: C++

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

int main(){

int A,B;
cin>>A;
cin>>B;

int x
x=(A+B)/2;

if(x%10==0){cout<<x<<endl;}
else{cout<<x+1<<endl;}



}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:1: error: expected initializer before 'x'
   11 | x=(A+B)/2;
      | ^
a.cc:13:4: error: 'x' was not declared in this scope
   13 | if(x%10==0){cout<<x<<endl;}
      |    ^
Language: C++

#include <iostream>
#include <array>
#include <algorithm>
#include <map>
#include <iostream>
#include <vector>
using namespace std;

int main()
{
	int a, b;
	cin >> a >> b;
	double d = (a + b) * 0.5;
	cout << ceil(d);
	return 0;
}

const int mod = 1000000007;
struct mint {
	long long x; // typedef long long ll;
	mint(long long x = 0) :x((x% mod + mod) % mod) {}
	mint operator-() const { return mint(-x); }
	mint& operator+=(const mint a) {
		if ((x += a.x) >= mod) x -= mod;
		return *this;
	}
	mint& operator-=(const mint a) {
		if ((x += mod - a.x) >= mod) x -= mod;
		return *this;
	}
	mint& operator*=(const mint a) {
		(x *= a.x) %= mod;
		return *this;
	}
	mint operator+(const mint a) const {
		mint res(*this);
		return res += a;
	}
	mint operator-(const mint a) const {
		mint res(*this);
		return res -= a;
	}
	mint operator*(const mint a) const {
		mint res(*this);
		return res *= a;
	}
	mint pow(long long t) const {
		if (!t) return 1;
		mint a = pow(t >> 1);
		a *= a;
		if (t & 1) a *= *this;
		return a;
	}

	// for prime mod
	mint inv() const {
		return pow(mod - 2);
	}
	mint& operator/=(const mint a) {
		return (*this) *= a.inv();
	}
	mint operator/(const mint a) const {
		mint res(*this);
		return res /= a;
	}
};

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

#include <iostream>
#include <array>
#include <algorithm>
#include <map>
#include <iostream>
#include <vector>
using namespace std;

int main()
{
	int a, b;
	cin >> a >> b;
	cout << ceil((a + b) * 0.5);
	return 0;
}

const int mod = 1000000007;
struct mint {
	long long x; // typedef long long ll;
	mint(long long x = 0) :x((x% mod + mod) % mod) {}
	mint operator-() const { return mint(-x); }
	mint& operator+=(const mint a) {
		if ((x += a.x) >= mod) x -= mod;
		return *this;
	}
	mint& operator-=(const mint a) {
		if ((x += mod - a.x) >= mod) x -= mod;
		return *this;
	}
	mint& operator*=(const mint a) {
		(x *= a.x) %= mod;
		return *this;
	}
	mint operator+(const mint a) const {
		mint res(*this);
		return res += a;
	}
	mint operator-(const mint a) const {
		mint res(*this);
		return res -= a;
	}
	mint operator*(const mint a) const {
		mint res(*this);
		return res *= a;
	}
	mint pow(long long t) const {
		if (!t) return 1;
		mint a = pow(t >> 1);
		a *= a;
		if (t & 1) a *= *this;
		return a;
	}

	// for prime mod
	mint inv() const {
		return pow(mod - 2);
	}
	mint& operator/=(const mint a) {
		return (*this) *= a.inv();
	}
	mint operator/(const mint a) const {
		mint res(*this);
		return res /= a;
	}
};

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

#include <iostream>
#include <array>
#include <algorithm>
#include <map>
#include <iostream>
#include <vector>
using namespace std;

int main()
{
	int a, b;
	cin >> a >> b;
	cout << ceil((a + b) / 2.0);
	return 0;
}

const int mod = 1000000007;
struct mint {
	long long x; // typedef long long ll;
	mint(long long x = 0) :x((x% mod + mod) % mod) {}
	mint operator-() const { return mint(-x); }
	mint& operator+=(const mint a) {
		if ((x += a.x) >= mod) x -= mod;
		return *this;
	}
	mint& operator-=(const mint a) {
		if ((x += mod - a.x) >= mod) x -= mod;
		return *this;
	}
	mint& operator*=(const mint a) {
		(x *= a.x) %= mod;
		return *this;
	}
	mint operator+(const mint a) const {
		mint res(*this);
		return res += a;
	}
	mint operator-(const mint a) const {
		mint res(*this);
		return res -= a;
	}
	mint operator*(const mint a) const {
		mint res(*this);
		return res *= a;
	}
	mint pow(long long t) const {
		if (!t) return 1;
		mint a = pow(t >> 1);
		a *= a;
		if (t & 1) a *= *this;
		return a;
	}

	// for prime mod
	mint inv() const {
		return pow(mod - 2);
	}
	mint& operator/=(const mint a) {
		return (*this) *= a.inv();
	}
	mint operator/(const mint a) const {
		mint res(*this);
		return res /= a;
	}
};

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

#include <iostream>
#include <array>
#include <algorithm>
#include <map>
#include <iostream>
#include <vector>
using namespace std;

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

const int mod = 1000000007;
struct mint {
	long long x; // typedef long long ll;
	mint(long long x = 0) :x((x% mod + mod) % mod) {}
	mint operator-() const { return mint(-x); }
	mint& operator+=(const mint a) {
		if ((x += a.x) >= mod) x -= mod;
		return *this;
	}
	mint& operator-=(const mint a) {
		if ((x += mod - a.x) >= mod) x -= mod;
		return *this;
	}
	mint& operator*=(const mint a) {
		(x *= a.x) %= mod;
		return *this;
	}
	mint operator+(const mint a) const {
		mint res(*this);
		return res += a;
	}
	mint operator-(const mint a) const {
		mint res(*this);
		return res -= a;
	}
	mint operator*(const mint a) const {
		mint res(*this);
		return res *= a;
	}
	mint pow(long long t) const {
		if (!t) return 1;
		mint a = pow(t >> 1);
		a *= a;
		if (t & 1) a *= *this;
		return a;
	}

	// for prime mod
	mint inv() const {
		return pow(mod - 2);
	}
	mint& operator/=(const mint a) {
		return (*this) *= a.inv();
	}
	mint operator/(const mint a) const {
		mint res(*this);
		return res /= a;
	}
};

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

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

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

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

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

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   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:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |   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:5:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 |   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>
int main() {
  int a,b;
  cin >> a >> b;
  cout << (a+b+1)/2 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   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:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |   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:5:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 |   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>
int main() {
  int a,b,c;
  cin >> a >> b;
  cout << (a+b+1)/2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   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:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |   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:5:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 |   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 namespace std;
typedef long long ll;
 
int main(){
  int a,b,x;
  cin >> a >> b;
  x = (a+b)/2;
  x = int(x);
  if((a+b)/2 = x ){
  cout << x << endl;
  }
  else{
    cout << x+1 << endl;
  }
    
}

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

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

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

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

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

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

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:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> a>>b;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:6:3: error: 'cout' was not declared in this scope
    6 |   cout << (a*b)/2 << endl;
      |   ^~~~
a.cc:6:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:6:22: error: 'endl' was not declared in this scope
    6 |   cout << (a*b)/2 << endl;
      |                      ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
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:20: 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;
  cin >> a >> b;
  int c = a + b;
  if(c % 2 == 0){
    cout << c / 2 << endl;
  }
  else{
    cout << c / 2 + 1 endl;
  }
}

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

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


Compiler output:
Main.java:8: error: cannot find symbol
    System.out.println(ceil(ans));
                       ^
  symbol:   method ceil(double)
  location: class Main
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: expected ';' before '}' token
   16 |     b=-1*b
      |           ^
      |           ;
   17 |   }
      |   ~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:6: error: conflicting declaration 'int c'
    9 |  int c ;
      |      ^
a.cc:7:9: note: previous declaration as 'double c'
    7 |  double c ;
      |         ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'd' was not declared in this scope
   10 |   d = (a+b)/2;
      |   ^
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] argas){
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    int count = 0;
    for(int i = 0; i < 3; i++){
      char b = a.charAt(i);
	if (b.equals(1)) count++;
    }
    System.out.println(count);
  }
}

Compiler output:
Main.java:9: error: char cannot be dereferenced
	if (b.equals(1)) count++;
	     ^
1 error
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] argas){
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    int count = 0;
    for(int i = 0; i < 3; i++){
	if (a.charAt(i).equals(1)) count++;
    }
    System.out.println(count);
  }
}

Compiler output:
Main.java:8: error: char cannot be dereferenced
	if (a.charAt(i).equals(1)) count++;
	               ^
1 error
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] argas){
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    int count = 0;
    for(int i = 0; i < 3; i++){
	if (a.charAt(i) == "1") count++;
    }
    System.out.println(count);
  }
}

Compiler output:
Main.java:8: error: bad operand types for binary operator '=='
	if (a.charAt(i) == "1") count++;
	                ^
  first type:  char
  second type: String
1 error
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] argas){
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    int count = 0;
    for(int i = 0; i < 3; i++){
	if (a.subString(i) == "1") count++;
    }
    System.out.println(count);
  }
}

Compiler output:
Main.java:8: error: cannot find symbol
	if (a.subString(i) == "1") count++;
	     ^
  symbol:   method subString(int)
  location: variable a of type String
1 error
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] argas){
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    int count = 0;
    if(a[0] == 1) count++;
    if(a[1]  == 1) count++;
    if (a[2] == 1) count++;
    System.out.println(count);
  }
}

Compiler output:
Main.java:7: error: array required, but String found
    if(a[0] == 1) count++;
        ^
Main.java:8: error: array required, but String found
    if(a[1]  == 1) count++;
        ^
Main.java:9: error: array required, but String found
    if (a[2] == 1) count++;
         ^
3 errors
Language: Java

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

Compiler output:
Main.java:5: error: cannot find symbol
      a = sc.nextInt();
      ^
  symbol:   variable a
  location: class Main
Main.java:6: error: cannot find symbol
      b = sc.nextInt();
      ^
  symbol:   variable b
  location: class Main
Main.java:7: error: cannot find symbol
    double c = (a + b) / 2.0;
                ^
  symbol:   variable a
  location: class Main
Main.java:7: error: cannot find symbol
    double c = (a + b) / 2.0;
                    ^
  symbol:   variable b
  location: class Main
Main.java:8: error: cannot find symbol
      int d = (a + b ) / 2;
               ^
  symbol:   variable a
  location: class Main
Main.java:8: error: cannot find symbol
      int d = (a + b ) / 2;
                   ^
  symbol:   variable b
  location: class Main
6 errors
Language: Java

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

Compiler output:
Main.java:1: error: cannot find symbol
import java.util.scanner;
                ^
  symbol:   class scanner
  location: package java.util
Main.java:4: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
                     ^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
      a = sc.nextInt();
      ^
  symbol:   variable a
  location: class Main
Main.java:6: error: cannot find symbol
      b = sc.nextInt();
      ^
  symbol:   variable b
  location: class Main
Main.java:7: error: cannot find symbol
    double c = (a + b) / 2.0;
                ^
  symbol:   variable a
  location: class Main
Main.java:7: error: cannot find symbol
    double c = (a + b) / 2.0;
                    ^
  symbol:   variable b
  location: class Main
Main.java:8: error: cannot find symbol
      int d = (a + b ) / 2;
               ^
  symbol:   variable a
  location: class Main
Main.java:8: error: cannot find symbol
      int d = (a + b ) / 2;
                   ^
  symbol:   variable b
  location: class Main
9 errors
Language: Java

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

Compiler output:
Main.java:3: error: <identifier> expected
  public static void main(String{} args){
                                ^
Main.java:3: error: <identifier> expected
  public static void main(String{} args){
                                       ^
2 errors
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;
  else 
    cout (a + b) / 2;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (int)'
    8 |     cout (a + b) / 2 + 1;
      |     ~~~~~^~~~~~~
a.cc:10:10: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (int)'
   10 |     cout (a + b) / 2;
      |     ~~~~~^~~~~~~
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;
  else 
    cout (a + b) / 2;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: lvalue required as left operand of assignment
    7 |   if((a + b) % 2 = 1)
      |      ~~~~~~~~^~~
a.cc:8:10: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (int)'
    8 |     cout (a + b) / 2 + 1;
      |     ~~~~~^~~~~~~
a.cc:10:10: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (int)'
   10 |     cout (a + b) / 2;
      |     ~~~~~^~~~~~~
Language: C++

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

int main(){
  unsigned int a,b;
  double x;
  
  cout << " Please inout [a], [b] number(1<= a, b <=100)" << endl;
  cin >> a >> b;
  if(a < 1 && a >100){
    cout << "a : not correct number" << endl;
    return;
  }
  if(b < 1 && b >100){
    cout << "b : not correct number" << endl;
    return;
  }
  
  x = (a+b)/2;
  
  cout << ceil(x) << endl;
}

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

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

Compiler output:
a.cc:9:1: error: extended character 　 is not valid in an identifier
    9 | 　c = a + b + 0.9;
      | ^
a.cc: In function 'int main()':
a.cc:9:1: error: '\U00003000c' was not declared in this scope
    9 | 　c = a + b + 0.9;
      | ^~~
Language: C++

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

int main(){ 
    int a,b;
    int  t=a+b;

    if(((t*10)%2)!=0){
        cout<<t/2+1<<ensl;
        }else{cout<<t/2<<endl;
    }
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: 'ensl' was not declared in this scope
    9 |         cout<<t/2+1<<ensl;
      |                      ^~~~
Language: C++

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

int main(){ 
    int a,b;
    double t=a+b;

    if((t%2)*10!=0){
        cout<<t/2+1<<ensl;
        }else{cout<<t/2<<endl;
    }
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    8 |     if((t%2)*10!=0){
      |         ~^~
      |         | |
      |         | int
      |         double
a.cc:9:22: error: 'ensl' was not declared in this scope
    9 |         cout<<t/2+1<<ensl;
      |                      ^~~~
Language: C++

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

int main(){ 
    int a,b;
    int t=a+b;

    if((t%2)*10!=0){
        cout<<t/2+1<<ensl;
        }else{cout<<t/2<<endl;
    }
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: 'ensl' was not declared in this scope
    9 |         cout<<t/2+1<<ensl;
      |                      ^~~~
Language: C++

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

int main() {
  int a, b;

  // 変数aで入力を受け取る
  cin >> a >> b;
  int x = ceil((a + b)/2)
  cout << x << endl;
}


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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a, b;
  cin >> a >> b;
  cout << (a+b+((a+b)%2)/2 << 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+((a+b)%2)/2 << endl;
      |            ~~~~~~~~~~~~~~~~^~~~~~~
a.cc:7:35: error: expected ')' before ';' token
    7 |   cout << (a+b+((a+b)%2)/2 << endl;
      |           ~                       ^
      |                                   )
Language: C++

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

    double num = a + b;
    if(num % 2 == 0){
        cout << num / 2; 
    }else{
        cout << num / 2 + 1;
    }

 return 0;
}

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(num % 2 == 0){
      |        ~~~ ^ ~
      |        |     |
      |        |     int
      |        double
Language: C++

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

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

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

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

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

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

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

Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:3: error: expected primary-expression before 'int'
    5 |   int a,b;
      |   ^~~
a.cc:5:3: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:6:3: error: expected unqualified-id before numeric constant
    6 |   1<=(a,b);
      |   ^
a.cc:7:3: error: 'cin' does not name a type
    7 |   cin>>a>>b;
      |   ^~~
a.cc:8:3: error: 'cout' does not name a type
    8 |   cout << (a+b+1)/2<<endl;
      |   ^~~~
a.cc:9:1: error: expected declaration before '}' token
    9 | }
      | ^
Language: C++

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

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

Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:3: error: expected primary-expression before 'int'
    5 |   int a,b;
      |   ^~~
a.cc:5:3: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:6:3: error: expected unqualified-id before numeric constant
    6 |   0<(a,b);
      |   ^
a.cc:7:3: error: 'cin' does not name a type
    7 |   cin>>a>>b;
      |   ^~~
a.cc:8:3: error: 'cout' does not name a type
    8 |   cout << (a+b)/2+1<<endl;
      |   ^~~~
Language: C++

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

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

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespase'
    2 | using namespase 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;
      |   ^~~
      |   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:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   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:8:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |   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,b,d;
  double c;
  c=(a+b)/;
  d=c;
  cin >> a >>b;
  cout <<d << endl;
}

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

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

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


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

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

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

  

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |   ans = (a+b)/2;
      |   ^~~
      |   abs
Language: C++

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

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


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

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

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


Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:9:26: error: invalid operands of types 'double' and 'double' to binary 'operator%'
    9 |   cout << (a + b) /2 + a % b << endl;
      |                        ~ ^ ~
      |                        |   |
      |                        |   double
      |                        double
Language: C++

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

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

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

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

Compiler output:
a.cc:2:1: error: 'usind' does not name a type
    2 | usind namespace 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:8:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   cout<<x<<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:12: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |   cout<<x<<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,b;	
  int x = (a+b)/2	
  ;cin >> a,b
  cout << x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: expected ';' before 'cout'
    7 |   ;cin >> a,b
      |              ^
      |              ;
    8 |   cout << x << endl;
      |   ~~~~
Language: C++

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

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


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

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

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


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:4: error: expected ',' or ';' before 'sin'
    8 |    sin >> a,b
      |    ^~~
Language: C++

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

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


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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: expected ';' before 'cout'
    8 |   d = 10*c
      |           ^
      |           ;
    9 |   cout << d/10 + (d%10)/5 << endl;
      |   ~~~~
Language: C++

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

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

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

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

#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >>a>>b;
  
  //sum = 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:15:4: error: expected '}' at end of input
   15 |   }
      |    ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'if'
    9 |   if((doubleAverage - intAverage)>=0.5){
      |   ^~
a.cc:11:4: 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;
  count << (a + b) / 2 + (a + b) % 2 << endl;
}

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

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

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