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

#include<stdio.h>
#include<Stdlib.h>
int main()
{
    int i,j;
    char s[30];
    gets(s);
    int y,x,flag=0;
    x=strlen(s);
    for(i=0;i<x;i++)
    {
        y=i+1;
        if(s[i]!=s[x-y])
        {
            flag++;
        }
    }
    if(flag>1)
    {
    printf("%d",flag-1);
    }
    else
        printf("%d",flag);
}


Compiler output:
main.c:2:9: fatal error: Stdlib.h: No such file or directory
    2 | #include<Stdlib.h>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int N, ans;
    cin >> N;
    vector<int> b(N - 1);
    for(int i = 0; i < N - 1; i++){
        cin >> b[i];
    }
    for(int i = 0; i < N; i++){
        if(N == 2){
        ans += 2 * b[0];
        break;
        }
        if(N != 2){
            if(i == 0){
                ans += b[i];
            }
            else
            {
                ans += min(b[i], b[i + 1]);
            }
            
        }
    }
    if(N == 2) cout << ans << endl;
    if(N > 2) cout << ans + b[N - 2] << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:27:46: error: expected '}' at end of input
   27 |     if(N > 2) cout << ans + b[N - 2] << endl;
      |                                              ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

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

int main()
{
 string s;
  cin >> s;
  
  int cnt = 0;
  bool f = false;
	do {
  for (int j = 0;j < s.length()/2; j++)
  {
   if (s[j] != s[s.length()/2 + j])
   {
     cnt++;
     s[j] = s[s.length()/2 +j];
     break;
   }
    if (j == s.length()/2-1)
      f = true;
  } while (!f);
  cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:2: error: expected 'while' at end of input
   24 | }
      |  ^
a.cc:24:2: error: expected '(' at end of input
   24 | }
      |  ^
      |  (
a.cc:24:2: error: expected primary-expression at end of input
a.cc:24:2: error: expected ')' at end of input
   24 | }
      |  ^
      |  )
a.cc:24:2: error: expected ';' at end of input
   24 | }
      |  ^
      |  ;
a.cc:24:2: error: expected '}' at end of input
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

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

int main()
{
 string s;
  cin >> s;
  
  int i;
  bool f = false;
	do {
  for (int j = 0;j < s.length()/2; j++)
  {
   if (s[j] != s[s.length()/2 + j])
   {
     cnt++;
     s[j] = s[s.length()/2 +j];
     break;
   }
    if (j == s.length()/2-1)
      f = true;
  } while (!f);
  cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:6: error: 'cnt' was not declared in this scope; did you mean 'int'?
   16 |      cnt++;
      |      ^~~
      |      int
a.cc:23:11: error: 'cnt' was not declared in this scope; did you mean 'int'?
   23 |   cout << cnt << endl;
      |           ^~~
      |           int
a.cc:24:2: error: expected 'while' at end of input
   24 | }
      |  ^
a.cc:24:2: error: expected '(' at end of input
   24 | }
      |  ^
      |  (
a.cc:24:2: error: expected primary-expression at end of input
a.cc:24:2: error: expected ')' at end of input
   24 | }
      |  ^
      |  )
a.cc:24:2: error: expected ';' at end of input
   24 | }
      |  ^
      |  ;
a.cc:24:2: error: expected '}' at end of input
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin >> s;
  int n,count;
  n = s.size();
  count = 0;
  if(n % 2 == 0){
    for(i=0;i<(n+1)/2;i++){
      if(s.at(i)!=s.at(n-i-1)){
        count++;
      }
    }
  }else{
    for(i=0;i<(n-1)/2;i++){
      if(s.at(i)!=s.at(n-i-1)){
        count++;
      }
    }
  }
    cout << "count" << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'i' was not declared in this scope
   10 |     for(i=0;i<(n+1)/2;i++){
      |         ^
a.cc:16:9: error: 'i' was not declared in this scope
   16 |     for(i=0;i<(n-1)/2;i++){
      |         ^
Language: C++

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

int main(){
    string S;
    cin >> S;
    int l=S.length();
    int count=0;

        for (int i=0;i<(l\2);i++){
            if(S[i]!=S[l-i]) count++;
        }

        cout << count << endl;
}


Compiler output:
a.cc:11:26: error: stray '\' in program
   11 |         for (int i=0;i<(l\2);i++){
      |                          ^
a.cc: In function 'int main()':
a.cc:11:26: error: expected ')' before numeric constant
   11 |         for (int i=0;i<(l\2);i++){
      |                        ~ ^~
      |                          )
Language: C++

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

int main(){
    string S;
    cin >> S;
    int l=S.size(),count=0;

        for (int i=0;i<(l\2);i++){
            if(S[i]!=S[l-i]) count++;
        }

        cout << count << endl;
}


Compiler output:
a.cc:10:26: error: stray '\' in program
   10 |         for (int i=0;i<(l\2);i++){
      |                          ^
a.cc: In function 'int main()':
a.cc:10:26: error: expected ')' before numeric constant
   10 |         for (int i=0;i<(l\2);i++){
      |                        ~ ^~
      |                          )
Language: C++

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

int main(){
    string S;
    cin >> S;
    int l=S.size(),count=0;

        for (int i=0;i<l\2;i++){
            if(S[i]!=S[l-i]) count++;
        }

        cout << count << endl;
}


Compiler output:
a.cc:10:25: error: stray '\' in program
   10 |         for (int i=0;i<l\2;i++){
      |                         ^
a.cc: In function 'int main()':
a.cc:10:25: error: expected ';' before numeric constant
   10 |         for (int i=0;i<l\2;i++){
      |                         ^~
      |                         ;
a.cc:10:27: error: expected ')' before ';' token
   10 |         for (int i=0;i<l\2;i++){
      |             ~             ^
      |                           )
a.cc:10:28: error: 'i' was not declared in this scope
   10 |         for (int i=0;i<l\2;i++){
      |                            ^
Language: C++

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

int main(){
    string S;
    cin >> S;
    int l=S.size(),count=0;

        for (int i=0;i<l\2;i++;){
            if(S[i]!=S[l-i]) count++;
        }

        cout << count << endl;
}


Compiler output:
a.cc:10:25: error: stray '\' in program
   10 |         for (int i=0;i<l\2;i++;){
      |                         ^
a.cc: In function 'int main()':
a.cc:10:25: error: expected ';' before numeric constant
   10 |         for (int i=0;i<l\2;i++;){
      |                         ^~
      |                         ;
a.cc:10:27: error: expected ')' before ';' token
   10 |         for (int i=0;i<l\2;i++;){
      |             ~             ^
      |                           )
a.cc:10:28: error: 'i' was not declared in this scope
   10 |         for (int i=0;i<l\2;i++;){
      |                            ^
a.cc:10:32: error: expected primary-expression before ')' token
   10 |         for (int i=0;i<l\2;i++;){
      |                                ^
Language: C++

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

int main(){
    string S;
    cin >> S;
    int l=S.size(),count=0;

        for (int i=0;i<l\2;i++){
            if(S[i]!=S[l-i]) count++;
        }

        cout << count << endl;
}


Compiler output:
a.cc:10:25: error: stray '\' in program
   10 |         for (int i=0;i<l\2;i++){
      |                         ^
a.cc: In function 'int main()':
a.cc:10:25: error: expected ';' before numeric constant
   10 |         for (int i=0;i<l\2;i++){
      |                         ^~
      |                         ;
a.cc:10:27: error: expected ')' before ';' token
   10 |         for (int i=0;i<l\2;i++){
      |             ~             ^
      |                           )
a.cc:10:28: error: 'i' was not declared in this scope
   10 |         for (int i=0;i<l\2;i++){
      |                            ^
Language: C++

#include <iostream>
#include <cstring>
using namespace std;
int main(){
  int i, l, a=0;
  char s[101];
  cin >> s;
  l=strlen(s);
  for(i=0; i<l/2; i+)
    if(s[i]!=s[l-1-i]) a++;
  cout << a << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: expected primary-expression before ')' token
    9 |   for(i=0; i<l/2; i+)
      |                     ^
Language: C++

#include<iostream>
#include<string>
using namepsace std;
int main(){
  string ST;
  cin>>ST;
  int m;
  int n=ST.size();
  string t;
  if(n%2==0){
  for(int i=0;i<n/2;i++){
    t=t+ST[i];
  }
    for(int i=n/2+1;i<n;i++){
      if(t!=ST[i]){
        m++;
      }
    }
  }
  else{
    for(int i=0;i<n/2-1;i++){
    t=t+ST[i];
  }
    for(int i=n/2+2;i<n;i++){
      if(t!=ST[i]){
        m++;
      }
    }
  }
  cout<<m<<endl;
 return 0; 
}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namepsace'
    3 | using namepsace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string ST;
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>ST;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:8: error: 'ST' was not declared in this scope
    6 |   cin>>ST;
      |        ^~
a.cc:9:9: error: expected ';' before 't'
    9 |   string t;
      |         ^~
      |         ;
a.cc:12:5: error: 't' was not declared in this scope
   12 |     t=t+ST[i];
      |     ^
a.cc:15:10: error: 't' was not declared in this scope
   15 |       if(t!=ST[i]){
      |          ^
a.cc:22:5: error: 't' was not declared in this scope
   22 |     t=t+ST[i];
      |     ^
a.cc:25:10: error: 't' was not declared in this scope
   25 |       if(t!=ST[i]){
      |          ^
a.cc:30:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   30 |   cout<<m<<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:30:12: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   30 |   cout<<m<<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 <stdio.h>
#include <string.h>
int main()
{
	char c[120];
	gets(c);
	int k=strlen(c);
	int s=0;
	for(int i=0;i<k/2;i++)
	  if(c[i]!=c[k-1-i])
	    s++;
	    printf("%d\n",s);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
    6 |         gets(c);
      |         ^~~~
      |         getw
Language: C++

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

#define ll long long
#define mod 1000000007
#define pll pair<long long,long long>
#define pdd pair<long double,long double>
#define vll vector<ll>
#define rep(i,j,n) for(int i=j;i<n;i++)
#define mp make_pair
#define pb push_back
#define pf push_front
priority_queue<pll,vector<pll>,greater<pll> >pq;
priority_queue<ll,vector<ll>,greater<ll> >pq1;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    string s;
  	cin>>s;
  	ll n=s.size(),c=0;
  	for(int i=0;i<n/2;i++)
    {
      if(s[i]!=s[n-1-i)
           c++;
    }
    cout<<c;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:23: error: expected ']' before ')' token
   25 |       if(s[i]!=s[n-1-i)
      |                       ^
      |                       ]
Language: C++

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

#define ll long long
#define mod 1000000007
#define pll pair<long long,long long>
#define pdd pair<long double,long double>
#define vll vector<ll>
#define rep(i,j,n) for(int i=j;i<n;i++)
#define mp make_pair
#define pb push_back
#define pf push_front
priority_queue<pll,vector<pll>,greater<pll> >pq;
priority_queue<ll,vector<ll>,greater<ll> >pq1;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    string s;
  	cin>>s;
  	ll n=s.size(),c=0;
  	for(int i=0;i<n/2;i++)
    {
      if(s[i]!=s[n-1-i)
           c++;
    }
    cout<<ceil(c/2);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:23: error: expected ']' before ')' token
   25 |       if(s[i]!=s[n-1-i)
      |                       ^
      |                       ]
Language: C++

#include<iostream>
#include<string>
#include<stdio.h>
#include<cctype>
#include<algorithm>
#include<climits>
#include<cmath>
#include<map>
#include<vector>
#define INF INT_MAX
using namespace std;

char S[101];
int ans;

int main(){
	cin >> S;
	int N = strlen(S);
	for (int i = 0; i < N; i++){
		if (S[i] != S[N - 1 - i])ans++;
	}
	cout << ans / 2 << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:17: error: 'strlen' was not declared in this scope
   18 |         int N = strlen(S);
      |                 ^~~~~~
a.cc:10:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    9 | #include<vector>
  +++ |+#include <cstring>
   10 | #define INF INT_MAX
Language: C++

/*
 _____ _             _              _           _ 
|_   _| |__   ___   / \   _ __  ___| |__  _   _| |
  | | | '_ \ / _ \ / _ \ | '_ \/ __| '_ \| | | | |
  | | | | | |  __// ___ \| | | \__ \ | | | |_| | |
  |_| |_| |_|\___/_/   \_\_| |_|___/_| |_|\__,_|_|                                                

*/
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp>
#define ll          long long
#define pb          push_back
#define ppb         pop_back
#define    endl        '\n'
#define mii         map<ll int,ll int>
#define msi         map<string,ll int>
#define mis         map<ll int, string>
#define rep(i,a,b)    for(ll int i=a;i<b;i++)
#define repr(i,a,b) for(ll i=b-1;i>=a;i--)
#define trav(a, x)     for(auto& a : x)
#define pii         pair<ll int,ll int>
#define vi          vector<ll int>
#define vii         vector<pair<ll int, ll int>>
#define vs          vector<string>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (ll int)x.size()
#define hell        1000000007
#define lbnd        lower_bound
#define ubnd        upper_bound

/*    For Debugging    */
#define DEBUG         cerr<<"/n>>>I'm Here<<</n"<<endl;
#define display(x) trav(a,x) cout<<a<<" ";cout<<endl;
#define what_is(x)  cerr << #x << " is " << x << endl;

std::mt19937_64 rng(std::chrono::steady_clock::now().time_since_epoch().count());
#define ordered_set tree<ll, null_type,less<ll>, rb_tree_tag,tree_order_statistics_node_update> 
#define TIME        cerr << "\nTime elapsed: " << setprecision(5) <<1000.0 * clock() / CLOCKS_PER_SEC << "ms\n";
#define DECIMAL(n)  cout << fixed ; cout << setprecision(n);
#define FAST ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace __gnu_pbds;
using namespace std;
#define PI 3.141592653589793
#define N  100005

void solve()
{
    string s;
    cin>>s;
    ll ans=0;
    rep(i,0,n/2)
    {
        if(s[i]!=s[n-1-i])
            ans++;
    }
    cout<<ans<<endl;
    return;
}
int main()
{
    FAST
    int TESTS=1;
//    cin>>TESTS;
    while(TESTS--)
    {
        solve();
    }
    TIME
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:54:13: error: 'n' was not declared in this scope
   54 |     rep(i,0,n/2)
      |             ^
a.cc:19:40: note: in definition of macro 'rep'
   19 | #define rep(i,a,b)    for(ll int i=a;i<b;i++)
      |                                        ^
Language: C++

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

int main()
{
	string s;
  int ctr = 0;
  	cin>>s;
  
  for(int i=0;i<s.length()/2;i++)
  {
  	if(s[i]!=s[n-i-1]) ctr++;
  }
  
  cout<<ctr<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: 'n' was not declared in this scope
   12 |         if(s[i]!=s[n-i-1]) ctr++;
      |                    ^
Language: C++

#include<stdio.h>
#include<string.h>
int main(){
char[100] str;
  scanf("%s",str);
  int len = strlen(str);
  int counter=0;
  for(int i=0;i<len/2;i++){
	if(str[i]!=str[len-i-1]){
counter++;
    }
  }
  printf("%d\n",counter);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:6: error: expected identifier before numeric constant
    4 | char[100] str;
      |      ^~~
a.cc:4:6: error: expected ']' before numeric constant
    4 | char[100] str;
      |      ^~~
      |      ]
a.cc:4:5: error: structured binding declaration cannot have type 'char'
    4 | char[100] str;
      |     ^
a.cc:4:5: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:4:5: error: empty structured binding declaration
a.cc:4:11: error: expected initializer before 'str'
    4 | char[100] str;
      |           ^~~
a.cc:5:14: error: 'str' was not declared in this scope; did you mean 'std'?
    5 |   scanf("%s",str);
      |              ^~~
      |              std
Language: C++

#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main() {
  string s = "";
  cin >> s;
  string a = s;
  reverse(a.begin(), a.end());
  int cnt = 0;
  for (int i=0; i<s.size()l i++) {
    if (s.at(i) != a.at(i)) {
      cnt++;
    }
  }
  cout << cnt / 2 << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:27: error: expected ';' before 'l'
   13 |   for (int i=0; i<s.size()l i++) {
      |                           ^
      |                           ;
a.cc:13:27: error: 'l' was not declared in this scope
a.cc:13:28: error: expected ')' before 'i'
   13 |   for (int i=0; i<s.size()l i++) {
      |       ~                    ^~
      |                            )
a.cc:13:32: error: expected ';' before ')' token
   13 |   for (int i=0; i<s.size()l i++) {
      |                                ^
      |                                ;
Language: C++

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

int main(){
  string S;
  cin >> S;
  int head = 0;
  int tail = str.size(S) - 1;
  int count = 0;
  while(head == tail)
  {
    if(S[head] != S[tail]) {
      S[head] = S[tail];
      count++;
    }
    head++:
    tail--;
  }
  
  cout << count << endl;
  return 0;
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: 'str' was not declared in this scope; did you mean 'std'?
    8 |   int tail = str.size(S) - 1;
      |              ^~~
      |              std
a.cc:16:11: error: expected ';' before ':' token
   16 |     head++:
      |           ^
      |           ;
Language: C++

/* Don't try to hack it :|
 
            _/﹋\_
            (҂`_´)
            <,︻╦╤─҉- - - - - - - - - - - - - - -
            _/﹋\_
*/

#include <bits/stdc++.h>
#define ll long long 
#define all(v) v.begin() , v.end()
#define pb push_back
#define F first
#define S second
#define mp make_pair
#define tr(con) for(auto it = con.begin(); it!= con.end() ; it++)
#define INF 1e9+7   // 1 * 10^9+ 7
#define rep(i,l,r) for(ll i=l;i<=r;i++)
#define fo(i,n) for(ll i=0;i<n;i++)
using namespace std;

int main(){
	
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	string str ;
	cin >> str ;
	int count =0 ;
	for(int i=0;i<n/2;i++){
		if(str[i] !=str[n-1-i]) count++;
	}
	cout << count ;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:23: error: 'n' was not declared in this scope
   29 |         for(int i=0;i<n/2;i++){
      |                       ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  	string s;
  	cin>>s;
  	long long ans=0;
  	for(int i=0;i<s.size()/2;i++){
    	if(s[i] != s[n-i-1])
          ans++;
    }
  	cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: 'n' was not declared in this scope
    8 |         if(s[i] != s[n-i-1])
      |                      ^
Language: C++

#include <string>
#include <iostream>

using namespace std;

int main() {
    string S;
    cin >> S;

    string a = S.substr(0, S.length() / 2);
    string b = S.substr(S.length() / 2 , S.length());
    reverse(b.begin(), b.end());

    int count = 0;
    for (int i = 0; i < a.length(); ++i) {
        if(b.length() > i) {
            if(a[i] != b[i]) {
                count++;
            }
        }
    }
    cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'reverse' was not declared in this scope
   12 |     reverse(b.begin(), b.end());
      |     ^~~~~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
  string s,t;
  cin >> s;
  t = s;
  reverse(t.begin(), t.end());
  int count = 0;
  for(int i = 0;i < s.size();i++){
    if(s[i] != t[i]) count++;
  }
  cout << count/2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'reverse' was not declared in this scope
    8 |   reverse(t.begin(), t.end());
      |   ^~~~~~~
Language: C++

#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset

using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
	string S;
	cin >> S;
	string rev(S);
	reverse(rev.begin(), rev.end());
	double tmp = S.length() / 2.0;
	int end = ceil(tmp);
	int sum = 0;
	rep(i, end) {
		if (S[i] != rev[i]) sum++;
	}
	cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:19: error: 'ceil' was not declared in this scope
   27 |         int end = ceil(tmp);
      |                   ^~~~
Language: C++

#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset

using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
	string S;
	cin >> S;
	string rev(S);
	reverse(rev.begin(), rev.end());
	int end = std::ceil(S.length() / 2.0);
	int sum = 0;
	rep(i, end) {
		if (S[i] != rev[i]) sum++;
	}
	cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:24: error: 'ceil' is not a member of 'std'
   26 |         int end = std::ceil(S.length() / 2.0);
      |                        ^~~~
Language: C

#include <stdio.h>
int main(){
  char s[100];
  int i,k,r;
  scanf("%s",s);
  for(i=0;s[i]!='\0';i++){}
  for(k=0;k<(i/2);k++){
      if(s[k]!=s[i-k]){
          r++
      }
  }
  printf("%d",r);
}

Compiler output:
main.c: In function 'main':
main.c:9:14: error: expected ';' before '}' token
    9 |           r++
      |              ^
      |              ;
   10 |       }
      |       ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
int main(){
   string s;
   cin>>s;
   int count;
   count=0;
   for(int i=0;i<s.length()/2;i++){
     if(s[i]!=s[s.length()-i-1]){
       count++;
     }
   }
  cout<<count<<endl;
  return 0;

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

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int a,b,c;
  string s;
  cin >> s;
  for(int i=0;i<s.size();i++)
  {
    	if(s[i] != s[s.size()-1-i)
        {
          c++;
        }
  }
  cout << c;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:34: error: expected ']' before ')' token
   10 |         if(s[i] != s[s.size()-1-i)
      |                                  ^
      |                                  ]
Language: C++

#include <iostream>
using namespace std;
int main()
{
  string s;
  cin>>s;
  
  char *left=&s[0], *right&s[s.size()-1];
  int nc=0;
  while(1)
  {
    if(*left!=*right)
      nc++;
    if(s.size()%2==0 && left+1=right)
      break;
    if(s.size()%2!=0 && left+1=right-1)
      break;
    
    left++;
    right--;
    
  }
  cout<<nc<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:27: error: expected initializer before '&' token
    8 |   char *left=&s[0], *right&s[s.size()-1];
      |                           ^
a.cc:12:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |     if(*left!=*right)
      |        ~~~~~^~~~~~~~
a.cc:14:22: error: lvalue required as left operand of assignment
   14 |     if(s.size()%2==0 && left+1=right)
      |        ~~~~~~~~~~~~~~^~~~~~~~~
a.cc:16:37: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   16 |     if(s.size()%2!=0 && left+1=right-1)
      |                                ~~~~~^~
a.cc:16:22: error: lvalue required as left operand of assignment
   16 |     if(s.size()%2!=0 && left+1=right-1)
      |        ~~~~~~~~~~~~~~^~~~~~~~~
a.cc:20:5: warning: ISO C++ forbids decrementing a pointer of type 'std::ios_base& (*)(std::ios_base&)' [-Wpointer-arith]
   20 |     right--;
      |     ^~~~~
a.cc:20:10: error: lvalue required as decrement operand
   20 |     right--;
      |          ^~
Language: C++

#include <cstdio>
#include <cstring>
char str[101];
int main(){
    scanf("%s",str);
    int len=strlen(str);
    int flag=0;
    for(int i=0;i<len/2;i++){
        if(str[i]!=str[n-1-i])
          flag++;
    }
    printf("%d\n",flag);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: 'n' was not declared in this scope
    9 |         if(str[i]!=str[n-1-i])
      |                        ^
Language: C++

#include <cstdio>
#include <cstring>
char string[101];
int main(){
    scanf("%s",string);
    int len=strlen(string);
    int flag=0;
    for(int i=0;i<len/2;i++){
        if(string[i]!=string[n-1-i])
          flag++;
    }
    printf("%d\n",flag);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:30: error: 'n' was not declared in this scope
    9 |         if(string[i]!=string[n-1-i])
      |                              ^
Language: C

#include<stdio.h>
#include<string.h>
#include<math.h>
 
int main(){
   int count=0;
   char str[102];
   fgets(str,sizeof(str),stdin);
   int len=strlen(str);
   //printf("%s", str);
   for(int i=0;i<len/;i++) {
    if(str[i]!=str[len-i-1]) count++;    
   }
   printf("%d", count/2);
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:22: error: expected expression before ';' token
   11 |    for(int i=0;i<len/;i++) {
      |                      ^
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
    String SS=sc.next();
    String[]b=SS.split("");

    int count =0;
    
    int K=SS.length()
      for(int i=0;i<=K;i++){
        if(b[i].equals(b[K-1-i])){
        count=count+1;
        }else{
          count=count+0;
        }
      }
      System.out.println("count");
    if(K==1){
      System.out.println("0");
    }
    }
  }

          
          


Compiler output:
Main.java:11: error: ';' expected
    int K=SS.length()
                     ^
1 error
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
    String SS=sc.next();
    String[]b=SS.split("");

    int count =0;
    
    int K=SS.length;
      for(int i=0;i<=K/2;i++){
        if(b[i].equals(b[K-1-i])){
        count=count+1;
        }else{
          count=count+0;
        }
      }
      System.out.println("count");
    if(K==1){
      System.out.println("0");
    }
    }
  }

          
          


Compiler output:
Main.java:11: error: cannot find symbol
    int K=SS.length;
            ^
  symbol:   variable length
  location: variable SS of type String
1 error
Language: C++

#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <cstring>
#include <cmath>
 
using namespace std;
const int MAX = 110;
int dp[MAX][MAX];
 
int solve(string original){
    string duplicate = original;
 
    reverse(duplicate.begin(), duplicate.end());
 
    memset(dp,0,sizeof dp);
    int len = original.size();
 
   
    for(int i=1;i<=len;i++){
        for(int j=1;j<=len;j++){
            if(original[i-1]==duplicate[j-1]){
                dp[i][j] = dp[i-1][j-1] + 1;
            }
            else {
                dp[i][j] = max(dp[i][j-1],dp[i-1][j]);
 
            }
        }
    }
 
    return len - dp[len][len];
 
}
 
int main(){
 
    //freopen("input.txt","r",stdin);
    //freopen("out.txt","w",stdout);
 
    int test;
    //cin>>test;
 
    string x;
    //for (int i = 1; i <= test; ++i)
    //{
        /* code */
        cin>>x;
        printf("%d\n"solve(x));
    //}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:50:16: error: unable to find string literal operator 'operator""solve' with 'const char [4]', 'long unsigned int' arguments
   50 |         printf("%d\n"solve(x));
      |                ^~~~~~~~~~~
Language: Java

import java.util*;

public class Main{
  public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
    String SS=sc.next();
    String[]b=SS.split("");

    int count =0;
    
    int K=SS.length();
      for(int i=0;i<=K/2;i++){
        if(b[i].equals(b[K-1-i])){
        count=count+1;
        }else{
          count=count+0;
        }
      }
    
    import java.util.Scanner;

public class Main{
  public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
    String SS=sc.next();
    String[]b=SS.split("");

    int count =0;
    
    int K=SS.length();
      for(int i=0;i<=K/2;i++){
        if(b[i].equals(b[K-1-i])){
        count=count+1;
        }else{
          count=count+0;
        }
      }
    
    
    if(K==1){
      System.out.println("0");
    }else if(K!=1){
                 System.out.println("count");
    }
    
   }
  }

          
          
 
    
   }
  }

          
          


Compiler output:
Main.java:1: error: ';' expected
import java.util*;
                ^
Main.java:20: error: illegal start of expression
    import java.util.Scanner;
    ^
Main.java:20: error: not a statement
    import java.util.Scanner;
                    ^
Main.java:22: error: illegal start of expression
public class Main{
^
Main.java:54: error: class, interface, enum, or record expected
  }
  ^
5 errors
Language: C++

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

int main() {
  string S;
  cin >> S; 
  int count=0;
  for (int i = 0; i<S.size(); i++){
    if(S.at(i)!=S.at(S.size()-i){
      count++;
    }
  }
  cout << count/2 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:33: error: expected ')' before '{' token
    9 |     if(S.at(i)!=S.at(S.size()-i){
      |       ~                         ^
      |                                 )
a.cc:12:3: error: expected primary-expression before '}' token
   12 |   }
      |   ^
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
    String SS=sc.next();
    String[]b=SS.split("");

    int count =0;
    
    int K=SS.length();
      for(int i=0;i<=K/2;i++){
        if(b[i].equals(b[K-1-i])){
        count=count+1;
        }else{
          count=count+0;
        }
      }
    
    import java.util.Scanner;

public class Main{
  public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
    String SS=sc.next();
    String[]b=SS.split("");

    int count =0;
    
    int K=SS.length();
      for(int i=0;i<=K/2;i++){
        if(b[i].equals(b[K-1-i])){
        count=count+1;
        }else{
          count=count+0;
        }
      }
    
    
    if(K==1){
      System.out.println("0");
    }else if(K!=1){
                 System.out.println("count");
    }
    
   }
  }

          
          

    if(K==1){
      System.out.println("0");
    }
    
   }
  }

          
          


Compiler output:
Main.java:20: error: illegal start of expression
    import java.util.Scanner;
    ^
Main.java:20: error: not a statement
    import java.util.Scanner;
                    ^
Main.java:22: error: illegal start of expression
public class Main{
^
Main.java:52: error: illegal start of type
    if(K==1){
    ^
Main.java:52: error: <identifier> expected
    if(K==1){
        ^
Main.java:57: error: class, interface, enum, or record expected
  }
  ^
6 errors
Language: C

#include <stdio.h>
 
int main()
{
	int i,a,count;
 
	char b[a+1];
	scanf("%s", &b);
  
    for(i=0; b[a]!='\0'; ++a);
  
	for ( i = 0; i < (a/2); i++) 
		if (b[ i] =! b[a-i+1]) 
        {count=count+1;
        }
          printf("&d",&count);
    }
		return 0;
}

Compiler output:
main.c:18:17: error: expected identifier or '(' before 'return'
   18 |                 return 0;
      |                 ^~~~~~
main.c:19:1: error: expected identifier or '(' before '}' token
   19 | }
      | ^
Language: C++

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

int main() {
      int count = 0;
      string s;
      getline(cin,s);
      size_t n = s.size(s);

      for (i=0; i<n; i++) {
            if(s[i] != s[n-i]) {
                  count++;
            }
      }
      cout << count <<endl;
      return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: no matching function for call to 'std::__cxx11::basic_string<char>::size(std::string&)'
    9 |       size_t n = s.size(s);
      |                  ~~~~~~^~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1076:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
 1076 |       size() const _GLIBCXX_NOEXCEPT
      |       ^~~~
/usr/include/c++/14/bits/basic_string.h:1076:7: note:   candidate expects 0 arguments, 1 provided
a.cc:11:12: error: 'i' was not declared in this scope
   11 |       for (i=0; i<n; i++) {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
  int i,c1=0,c2=0,c;
  string s;
  cin>>s;
  n=s.length();
  for(i=0;i<n/2;i++)
  {
    if (s[i]!=s[n-1-i])
      c1++;
  }
  for(i=n/2;i<n;i++)
  {
    if (s[i]!=s[n-1-i])
      c2++;
  }
  if (c1<c2)
    c=c1;
  else
    c=c2;
  cout<<c;
}

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

#include <bits/stdc++.h>
using namespace std;
int main();
{
  int i,c1=0,c2=0,c;
  string s;
  cin>>s;
  n=s.length();
  for(i=0;i<n/2;i++)
  {
    if (s[i]!=s[n-1-i])
      c1++;
  }
  for(i=n/2;i<n;i++)
  {
    if (s[i]!=s[n-1-i])
      c2++;
  }
  if (c1<c2)
    c=c1;
  else
    c=c2;
  cout<<c;
}
    
    
    
    
    

  

Compiler output:
a.cc:4:1: error: expected unqualified-id before '{' token
    4 | {
      | ^
Language: C

#include <stdio.h>
 
int main()
{
	int i,a,count;
 
	char b[a+1];
	scanf("%s", &b);
  
    for(i=0; b[a]!='\0'; ++a);
  
  	if (a % 2 == 1) {
	for ( i = 0; i < (a/2); i++) {
		if (b[ i] =! b[a-i+1]) 
        {count=count+1;
        }
          printf("&d",&count);
    }
		return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:1: error: expected declaration or statement at end of input
   20 | }
      | ^
Language: C

#include <stdio.h>
 
int main()
{
	int i,a,count;
 
	char b[a+1];
	scanf("%s", &b);
  
    for(i=0; b[a]!='\0'; ++a);
  
  	if (a % 2 == 1) {
	for ( i = 0; i < (a/2); i++) {
		if (b[ i] =! b[a-i+1]) 
        {count=count+1;
        }
          printf("&d",&count);
    }

}

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

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

int lenght(char*str){ 
 int a=strlen(str);
 return a;
}

int main() {
    char str[]; 
    cin >> str;
    int l = lenght(str);
 	int m = (l+1) / 2;
    int counter = 0;
    for (int i=0 ; i < m ; ++i) {
      	if (str[i] == str[l-i-1]) ++counter;
    }
 	int x = m - counter;
	cout << x << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: storage size of 'str' isn't known
   11 |     char str[];
      |          ^~~
Language: C++

#include<bits/stdc++.h> 
using namespace std; 
  
// Function to find the minimum number  
// character change required  
   
void change(string s) 
{ 
  
    // Finding the length of the string  
    int n = s.length();  
  
    // To store the number of replacement operations  
    int cc = 0; 
  
    for(int i=0;i<n/2;i++) 
    { 
  
        // If the characters at location  
        // i and n-i-1 are same then  
        // no change is required  
        if(s[i]== s[n-i-1])  
            continue; 
  
        // Counting one change operation  
        cc+= 1; 
  
        // Changing the character with higher  
        // ascii value with lower ascii value  
        if(s[i]<s[n-i-1])  
            s[n-i-1]= s[i] ; 
        else
            s[i]= s[n-i-1] ; 
    } 
    printf("Minimum characters to be replaced = %d\n", (cc)) ; 
    cout<<s<<endl;  
} 

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

#include <stdio.h>
 
int main()
{
	int i,a,count;
 
	char b[a+1];
	scanf("%s", &b);
  
    for(i=0; b[a]!='\0'; ++a);

  
  	if (a % 2 == 1) {
	for ( i = 0; i < (a/2); i++) {
		if (b[ i] =! b[a-i+1]) 
        {count=count+1;
        }
          printf("&d",&count);
    }

}

Compiler output:
main.c: In function 'main':
main.c:21:1: error: expected declaration or statement at end of input
   21 | }
      | ^
Language: C

#include <stdio.h>
 
int main()
{
	int i,a,count;
 
	char b[a+1];
	scanf("%s", &b);
  
    for(i=0; b[a]!='\0'; ++a);

  
  	if (a % 2 == 1) {
	for ( i = 0; i < (a/2); i++) {
		if (b[ i] =! b[a-i+1]) 
        {count=count+1;
        }
          printf("&d",&count);
    }
      	for ( i = 0; i < (a/2); i++) {
		if (b[ i] =! b[a-i+1]) 
        {count=count+1;
        }
          printf("&d",&count);
}

Compiler output:
main.c: In function 'main':
main.c:25:1: error: expected declaration or statement at end of input
   25 | }
      | ^
main.c:25:1: error: expected declaration or statement at end of input
Language: Java

import java.util.*;

public class Main{
  public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
    String SS=sc.next();
    String[]b=SS.split("");

    int count =0;
    
    int K=SS.length();
      for(int i=0;i<=K/2;i++){
        if(b[i].equals(b[K-1-i]){
        count=count+0;
        }else{
          count=count+1;
        }
      }
      System.out.println("count");
    if(K==1){
      System.out.println("0");
    }
    }
  }

          
          


Compiler output:
Main.java:13: error: ')' expected
        if(b[i].equals(b[K-1-i]){
                                ^
1 error
Language: C

#include <stdio.h>
 
int main()
{
	int i,a,count;
 
	char b[a+1];
	scanf("%s", &b);
  
    for(i=0; b[a]!='\0'; ++a);

	for ( i = 0; i < a; i++) {
		if (b[ i] =! b[a-i+1]) 
        {count=count+1;
        }
          printf("&d",&count);
}

Compiler output:
main.c: In function 'main':
main.c:17:1: error: expected declaration or statement at end of input
   17 | }
      | ^
Language: C

#include <stdio.h>
 
int main()
{
	int i,a,count;
 
	char b[a+1];
	scanf("%s", &b);
  
    for(i=0; b[a]!='\0'; ++a);

	for ( i = 0; i < a; i++) {
		if (b[ i] =! b[a-i+1]) 
        {count=count+1
        }
          printf("&d",&count);
}

Compiler output:
main.c: In function 'main':
main.c:14:23: error: expected ';' before '}' token
   14 |         {count=count+1
      |                       ^
      |                       ;
   15 |         }
      |         ~              
main.c:17:1: error: expected declaration or statement at end of input
   17 | }
      | ^
Language: Java

import java.io.*;

class abcA {
  public static void main(String[] args) throws IOExeption {
    BufferedReader br = 
      new BufferedReader(new ImputStreamReader(System.in));
    String str = br.readLine();
    int len = str.length();
    int count = 0;
    for (int i=0;i<len;i++){
      if(i>=len-i)
        break;
      if(str.charAt(i)!=str.charAt(len-i))
        count++;
    }
    
    System.out.println(count);
  }
}
  
   
  

Compiler output:
Main.java:4: error: cannot find symbol
  public static void main(String[] args) throws IOExeption {
                                                ^
  symbol:   class IOExeption
  location: class abcA
Main.java:6: error: cannot find symbol
      new BufferedReader(new ImputStreamReader(System.in));
                             ^
  symbol:   class ImputStreamReader
  location: class abcA
2 errors
Language: Java

import java.io.*;

class abcA {
  public static void main(String[] args) throws IOExeption {
    BufferedReader br = 
      new BufferedReader(new ImputStreamReader(System.in));
    String str = br.readLine();
    int len = str.length();
    int count = 0;
    for (int i=0;i<len;i++){
      if(i>=len-i)
        break;
      if(str.charAt(i)!=str.charAt(len-i))
        count++;
    }
    
    System.out.println(count);
  }
  
   
  

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

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

int main() {
  string S;
  cin >> S; 
  int count=0;
  int a;
    a=S.size()
  for (int i = 0; i<S.size();i++){
    if(S.at(i)!=S.at(a-i)){
      S.at(a-i)=S.at(i);
      count++;
    }
  }
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: expected ';' before 'for'
    9 |     a=S.size()
      |               ^
      |               ;
   10 |   for (int i = 0; i<S.size();i++){
      |   ~~~          
a.cc:10:19: error: 'i' was not declared in this scope
   10 |   for (int i = 0; i<S.size();i++){
      |                   ^
Language: C++

#include<stdio.h>
#include<string.h>
int main()
{
	char z[200];
	while(gets(z))
	 {
		int l=strlen(z);
		int count=0;
		for(int i=0;i<l/2;i++)
		{
			if(z[i]!=z[l-i-1])
			count++;
		}
		printf("%d\n",count);
		memset(z,'\0',sizeof(z));
	 }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'gets' was not declared in this scope; did you mean 'getw'?
    6 |         while(gets(z))
      |               ^~~~
      |               getw
Language: C++

#include<bits/stdc++.h>
int main()
{
	char z[200];
	while(gets(z))
	 {
		int l=strlen(z);
		int count=0;
		for(int i=0;i<l/2;i++)
		{
			if(z[i]!=z[l-i-1])
			count++;
		}
		printf("%d\n",count);
		memset(z,'\0',sizeof(z));
	 }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:15: error: 'gets' was not declared in this scope; did you mean 'getw'?
    5 |         while(gets(z))
      |               ^~~~
      |               getw
Language: C++

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

int main() {
  string S;
  cin >> S; 
  int count=0;
  int a
    a=S.size()
  for (int i = 0; i<a;i++){
    if(S.at(i)!=S.at(a-i)){
      S.at(a-i)=S.at(i);
      count++;
    }
  }
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected initializer before 'a'
    9 |     a=S.size()
      |     ^
a.cc:10:19: error: 'i' was not declared in this scope
   10 |   for (int i = 0; i<a;i++){
      |                   ^
a.cc:10:21: error: 'a' was not declared in this scope
   10 |   for (int i = 0; i<a;i++){
      |                     ^
Language: C++

#include<cstdio>
#include<cstring>
int main()
{
	char z[200];
	while(gets(z))
	 {
		int l=strlen(z);
		int count=0;
		for(int i=0;i<l/2;i++)
		{
			if(z[i]!=z[l-i-1])
			count++;
		}
		printf("%d\n",count);
		memset(z,'\0',sizeof(z));
	 }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'gets' was not declared in this scope; did you mean 'getw'?
    6 |         while(gets(z))
      |               ^~~~
      |               getw
Language: Java

public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String str = scan.next();
    StringBuilder sb = new StringBuilder(str);
    StringBuilder re = sb.reverse();
    int count = 0;
    for (int i = 0;i < sb.length();i++) {
      if (sb.charAt(i) != re.charAt(i)) {
        count++;
      }
    }
    System.out.pringln(count);
  }
}

Compiler output:
Main.java:3: error: cannot find symbol
    Scanner scan = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
    Scanner scan = new Scanner(System.in);
                       ^
  symbol:   class Scanner
  location: class Main
Main.java:13: error: cannot find symbol
    System.out.pringln(count);
              ^
  symbol:   method pringln(int)
  location: variable out of type PrintStream
3 errors
Language: C++

#include<cstdio>
#include<cstring>
int main()
{
	char z[200];
	gets(z);

		int l=strlen(z);
		int count=0;
		for(int i=0;i<l/2;i++)
		{
			if(z[i]!=z[l-i-1])
			count++;
		}
		printf("%d\n",count);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
    6 |         gets(z);
      |         ^~~~
      |         getw
Language: C++

include<bits/stdc++.h> 
#using namespace std; 
  
  
   
void change(string s) 
{ 
  
    
    int n = s.length();  
  
     
    int cc = 0; 
  
    for(int i=0;i<n/2;i++) 
    { 
  
         
        if(s[i]== s[n-i-1])  
            continue; 
  
         
        cc+= 1; 
  
         
        if(s[i]<s[n-i-1])  
            s[n-i-1]= s[i] ; 
        else
            s[i]= s[n-i-1] ; 
    } 
    printf("Minimum characters to be replaced = %d\n", (cc)) ; 
    cout<<s<<endl;  
} 

Compiler output:
a.cc:2:2: error: invalid preprocessing directive #using
    2 | #using namespace std;
      |  ^~~~~
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~