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

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

int main(){
	string s;
  	cin>>s;
  	int len = s.length();
  	if(len%2==0){
  		string s1 = s.substr(0, len/2);
  		string s1 = s.substr(len/2, len/2);
  		int count = 0;
  		for(int i=0;i<len/2;i++){
  			if(s1[i] ! = s2[len/2 - i - 1])
  				count++;
  		}
  		cout<<count;
  	}
  	else{
  		string s1 = s.substr(0, len/2);
  		string s1 = s.substr(len/2 + 1, len/2);
  		int count = 0;
  		for(int i=0;i<len/2;i++){
  			if(s1[i] ! = s2[len/2 - i - 1])
  				count++;
  		}
  		cout<<count;
  	}
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: redeclaration of 'std::string s1'
   10 |                 string s1 = s.substr(len/2, len/2);
      |                        ^~
a.cc:9:24: note: 'std::string s1' previously declared here
    9 |                 string s1 = s.substr(0, len/2);
      |                        ^~
a.cc:13:33: error: expected ')' before '!' token
   13 |                         if(s1[i] ! = s2[len/2 - i - 1])
      |                           ~     ^~
      |                                 )
a.cc:20:24: error: redeclaration of 'std::string s1'
   20 |                 string s1 = s.substr(len/2 + 1, len/2);
      |                        ^~
a.cc:19:24: note: 'std::string s1' previously declared here
   19 |                 string s1 = s.substr(0, len/2);
      |                        ^~
a.cc:23:33: error: expected ')' before '!' token
   23 |                         if(s1[i] ! = s2[len/2 - i - 1])
      |                           ~     ^~
      |                                 )
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main(){
 int count=0;
 string s;
 
 cin>>s;
 
 for(int i=0,j=s.size-1;i<s.size&& j>=0; i++,j--){
    
    if(s[i]!=s[j]){
      s[i]=s[j];
      count++;
    
    }
 
 
  }

 cout<<count;


return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: invalid use of member function '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]' (did you forget the '()' ?)
   11 |  for(int i=0,j=s.size-1;i<s.size&& j>=0; i++,j--){
      |                ~~^~~~
      |                      ()
a.cc:11:29: error: invalid use of member function '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]' (did you forget the '()' ?)
   11 |  for(int i=0,j=s.size-1;i<s.size&& j>=0; i++,j--){
      |                           ~~^~~~
      |                                 ()
Language: C

#include<iostream>
using namespace std;
int main()
{

    int a,b,c;
    cin>>a>>b>>c;
    if((a+b+c)==22)
    {
cout<<"bust";

    }
    else
    {
cout<<"win";

    }
}


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

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

int main()
{
    char string1[20];
    int i, length;
    int flag = 0;
    int k=0;
    
    cout << "Enter a string: "; cin >> string1;
    
    length = strlen(string1);
    if(length<= 100 && length>=1)
    {
    for(i=0;i < length ;i++)
	{
        if(string1[i] != string1[length-i-1])
		{
        	t=string1[i];
            string1[i] = string1[length-i-1];
            string1[length-i-1]=t;
            k++;
   		}
   	}

    cout<<k;
	}  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:17: error: 't' was not declared in this scope
   21 |                 t=string1[i];
      |                 ^
Language: C++

string a;
  cin>>a;
  int s=a.size();
  int count=0;
  for(int i=0;i<s/2;i++){
    //cout<<a[i]<<" "<<a[s-i]<<endl;
    if(a[i]!=a[s-i-1]){
      count++;
    }
  }
  cout<<count<<endl;
  return 0;
}



Compiler output:
a.cc:1:1: error: 'string' does not name a type
    1 | string a;
      | ^~~~~~
a.cc:2:3: error: 'cin' does not name a type
    2 |   cin>>a;
      |   ^~~
a.cc:3:9: error: 'a' was not declared in this scope
    3 |   int s=a.size();
      |         ^
a.cc:5:3: error: expected unqualified-id before 'for'
    5 |   for(int i=0;i<s/2;i++){
      |   ^~~
a.cc:5:15: error: 'i' does not name a type
    5 |   for(int i=0;i<s/2;i++){
      |               ^
a.cc:5:21: error: 'i' does not name a type
    5 |   for(int i=0;i<s/2;i++){
      |                     ^
a.cc:11:3: error: 'cout' does not name a type
   11 |   cout<<count<<endl;
      |   ^~~~
a.cc:12:3: error: expected unqualified-id before 'return'
   12 |   return 0;
      |   ^~~~~~
a.cc:13:1: error: expected declaration before '}' token
   13 | }
      | ^
Language: Java


import java.util.*;

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

        String A = sc.next();
        String[] B = A.split("");

        int count = 0;

        for(int i=0; i<(B.length/2; i++){
            if(B[i] != B[B.length-1]){
                count++;
            }else{
                // Nothing
            }
        }
        System.out.println(count);
    }
}

Compiler output:
Main.java:13: error: ')' expected
        for(int i=0; i<(B.length/2; i++){
                                  ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
int main(){
    FAST
    string s;
    cin>>s;
    int len=s.length();
    int count=0;
    for(int i=0;i<len/2;i++){
        if(s[i]!=s[n-i-1]) count++;
    }
    cout<<count<<endl;
    return 0;
}

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]) count++;
      |                    ^
Language: C++

#include<string>
int main()
{
  std::string src;
  std::cin>>src;
  int count=0;
  auto itr2=src.end();
  
  for(auto itr=src.begin();itr!=src.end();++itr)
  {
        --itr2;

    if(*itr!=*itr2)
      ++count;
  }
  std::cout<<count/2;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: 'cin' is not a member of 'std'
    5 |   std::cin>>src;
      |        ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<string>
  +++ |+#include <iostream>
    2 | int main()
a.cc:16:8: error: 'cout' is not a member of 'std'
   16 |   std::cout<<count/2;
      |        ^~~~
a.cc:16:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<string>
int main()
{
  std::string src;
  std::cin>>src;
  int count=0;
  auto itr2=src.end()-1;
  for(auto itr=src.begin();itr!=src.end();++itr)
  {
    if(*itr!=*itr2)
      ++count;
    --itr2;
  }
  std::cout<<count/2;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: 'cin' is not a member of 'std'
    5 |   std::cin>>src;
      |        ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<string>
  +++ |+#include <iostream>
    2 | int main()
a.cc:14:8: error: 'cout' is not a member of 'std'
   14 |   std::cout<<count/2;
      |        ^~~~
a.cc:14:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<iostream>
#include<string>
int main()
{
  std::string src;
  std::cin>>src;
  int count=0;
  auto itr2=src.end();
  for(auto itr=src.begin;itr!=src.end();++itr)
  {
    if(*itr!=*itr2)
      ++count;
    --itr2;
  }
  std::cout<<count/2;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: unable to deduce 'auto' from 'src.std::__cxx11::basic_string<char>::begin'
    9 |   for(auto itr=src.begin;itr!=src.end();++itr)
      |                ~~~~^~~~~
a.cc:9:20: note:   couldn't deduce template parameter 'auto'
    9 |   for(auto itr=src.begin;itr!=src.end();++itr)
      |                    ^~~~~
Language: C++

#include<iostream>
#include<string>
int main()
{
  std::string src;
  std::cin>>src;
  int count=0;
  auto *itr2=src.end();
  for(auto *itr=src.begin;itr!=src.end();++itr)
  {
    if(*itr!=*itr2)
      ++count;
    --itr2;
  }
  std::cout<<count/2;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: unable to deduce 'auto*' from 'src.std::__cxx11::basic_string<char>::end()'
    8 |   auto *itr2=src.end();
      |              ~~~~~~~^~
a.cc:8:22: note:   mismatched types 'auto*' and '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >'
    8 |   auto *itr2=src.end();
      |                      ^
a.cc:9:21: error: unable to deduce 'auto*' from 'src.std::__cxx11::basic_string<char>::begin'
    9 |   for(auto *itr=src.begin;itr!=src.end();++itr)
      |                 ~~~~^~~~~
a.cc:9:21: note:   mismatched types 'auto*' and 'std::__cxx11::basic_string<char>::const_iterator (std::__cxx11::basic_string<char>::*)() const noexcept'
    9 |   for(auto *itr=src.begin;itr!=src.end();++itr)
      |                     ^~~~~
a.cc:9:21: note:   mismatched types 'auto*' and 'std::__cxx11::basic_string<char>::iterator (std::__cxx11::basic_string<char>::*)() noexcept'
a.cc:9:21: note:   couldn't deduce template parameter 'auto'
Language: C++

#include <iostream>

using namespace std;

int main() {
    int k=0,i,n;
    char s[101];
    cin.getline(s,101); ///citirea unui sir de caractere
    n=strlen(s);
    for(i=0;i<=n/2;i++)
    {
         cout<<s[i]<<" "<<s[n-i-1]<<endl;
        if(s[i]!=s[n-i-1])
        {
            k++;
        }
    }
    cout<<k;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: 'strlen' was not declared in this scope
    9 |     n=strlen(s);
      |       ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 |
Language: C++

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

int main(void) {
    string S = "";
    cin >> S;

    // 奇数か
    auto isOdd = (S.length() & 1) == 1;

    auto index = S.length() / 2;
    auto lstr = S.substr(0, index);
    auto rstr = isOdd ? S.substr(index + 1) : S.substr(index);
    reverse(rstr.begin(), rstr.end());
    
    auto count = 0;
    for (auto i = 0; i < lstr.length(); i++) {
        if (lstr[i] != rstr[i]) 
            count++;
    }

    cout << count;
}

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

#include<iostream>
#include<string.h>
int main(){
  string text = abcdabc;
  int length = text.length();
  int j=length,count=0;
  for(int i=0;i<length;i++){
    if(text[i] == text[j-1]){
      j--;
    }
    else{
      count++;
    }
  }
  cout<<count;

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string text = abcdabc;
      |   ^~~~~~
a.cc:4: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:5:16: error: 'text' was not declared in this scope
    5 |   int length = text.length();
      |                ^~~~
a.cc:15:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |   cout<<count;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:15:15: error: expected '}' at end of input
   15 |   cout<<count;
      |               ^
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;
    string s1 = S.substr(0,S.size/2);
    reverse(S.begin(),S.end());
    string s2 = S.substr(0,S.size/2);
    int count = 0;
    for (int i = 0; i < s1.size(); i++){
        if (s1.at(i) != s2.at(i)) count++;
    }
    cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:30: error: invalid use of member function '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]' (did you forget the '()' ?)
    7 |     string s1 = S.substr(0,S.size/2);
      |                            ~~^~~~
      |                                  ()
a.cc:9:30: error: invalid use of member function '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]' (did you forget the '()' ?)
    9 |     string s2 = S.substr(0,S.size/2);
      |                            ~~^~~~
      |                                  ()
Language: Java

import java.util.Scanner;

/**
 * <p>ClassName:  </p>
 * <p>Description: </p>
 * <p>Company: </p>
 *
 * @author zhangyong
 * @version 1.0.0
 * @date 2019/12/10 22:39
 */
public class Solution {
    public static void main(String[] args) {
        String str = new Scanner(System.in).next();
        int count = 0;
        int left = 0, right = str.length() - 1;
        while (left < right) {
            if (str.charAt(left) == str.charAt(right)) {
                left += 1;
                right -= 1;
                continue;
            } else {
                left += 1;
                right -= 1;
                count += 1;
            }
        }
        System.out.println(count);
    }
}

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

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

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

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

Compiler output:
main.c: In function 'main':
main.c:9:3: error: 'len' undeclared (first use in this function)
    9 |   len = strlen(S);
      |   ^~~
main.c:9:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:14: error: expected ';' before '}' token
   12 |       count++
      |              ^
      |              ;
   13 |     }
      |     ~         
main.c:15:3: error: expected declaration or statement at end of input
   15 |   printf("%d", count);
      |   ^~~~~~
Language: C

#include<stdio.h>
#include<string.h>

int main(void){
  int i;
  int count;
  char S[100];
  scanf("%s", s);
  len = strlen(s);
  for(i = 0; i < len/2; i++){
    if(i != len - i - 1) {
      count++
    }
  }
  printf("%d", count);

Compiler output:
main.c: In function 'main':
main.c:8:15: error: 's' undeclared (first use in this function)
    8 |   scanf("%s", s);
      |               ^
main.c:8:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:3: error: 'len' undeclared (first use in this function)
    9 |   len = strlen(s);
      |   ^~~
main.c:12:14: error: expected ';' before '}' token
   12 |       count++
      |              ^
      |              ;
   13 |     }
      |     ~         
main.c:15:3: error: expected declaration or statement at end of input
   15 |   printf("%d", count);
      |   ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespce td;
int main()
{
  char s[100];
  int count=0;
  cin>>s;
  for(int i=0;i<strlen(s);i++)
  {
if(s[i]!=s[strlen(s)-1-i])
  count++;
  }
  cout<<count/2;
}
    

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespce'
    2 | using namespce td;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin>>s;
      |   ^~~
      |   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:13:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |   cout<<count/2;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

// Problem : D. Let's Play the Words?
// Contest : Codeforces Round #606 (Div. 2, based on Technocup 2020 Elimination Round 4)
// URL : https://codeforces.com/contest/1277/problem/D
// Memory Limit : 256.000000MB 
// Time Limit : 3000.000000milisec 
// Powered by CP Editor (https://github.com/coder3101/cp-editor2)
 
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <fstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <utility>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <cassert>
using namespace std;
 
typedef long long ll;
typedef long double ld;
typedef double db;
typedef string str;
 
typedef pair<int, int> pi;
typedef pair<ll,ll> pl;
typedef pair<ld,ld> pd;
 
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<ld> vd;
typedef vector<str> vs;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
 
#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL)
 
#define forn(i,a,b) for (int i = (a); i < (b); ++i)
#define fo(i,a) forn(i,0,a)
#define rforn(i,a,b) for (int i = (b)-1; i >= (a); --i)
#define ro(i,a) rforn(i,0,a)
#define trav(a,x) for (auto& a: x)
 
#define sz(x) (int)x.size()
#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)
#define rsz resize
#define ins insert
 
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define f first
#define s second
 
int main() {
 
	fast_cin();

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


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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: request for member 'length' in 's', which is of non-class type 'char'
    8 |   for(int i=0;i<s.length();i++)
      |                   ^~~~~~
a.cc:10:15: error: request for member 'length' in 's', which is of non-class type 'char'
   10 |   for(int j=s.length();j>0;j--)
      |               ^~~~~~
a.cc:12:9: error: invalid types 'char[int]' for array subscript
   12 |     if(s[i]!=s[j])
      |         ^
a.cc:12:15: error: invalid types 'char[int]' for array subscript
   12 |     if(s[i]!=s[j])
      |               ^
Language: C++

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

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespac'
    2 | using namespac std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string s;
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin>>s;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:8: error: 's' was not declared in this scope
    7 |   cin>>s;
      |        ^
a.cc:16:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |   cout<<count<<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:16:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |   cout<<count<<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 count=0;
  char s[n];
  for(int i=0;i<n;i++)
  {
    cin>>s;
    for(int j=n;j>0;j--)
    { if(s[i]!=s[j])
      count++;
    }
    cout<<count<<endl;
  }
}
    
  

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: 'n' was not declared in this scope; did you mean 'yn'?
    5 | string s[n];
      |          ^
      |          yn
a.cc:7:8: error: 's' was not declared in this scope
    7 |   cin>>s;
      |        ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;
typedef long long ll;

int main(){
    int A = 0;
    string a;
    cin >> a;

    for(int i;i =< a.size();i ++) {
        if(a.at(i) != a.at(a.size() - i - 1))
        A ++;
        
    }

    cout << A <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: expected primary-expression before '<' token
   11 |     for(int i;i =< a.size();i ++) {
      |                  ^
Language: C++

var ans = 0;
for (int i = 0; i < N / 2; i++)
{
    var j = N - i - 1;
    if (S[i] != S[j]) ans++;
}

Compiler output:
a.cc:1:1: error: 'var' does not name a type
    1 | var ans = 0;
      | ^~~
a.cc:2:1: error: expected unqualified-id before 'for'
    2 | for (int i = 0; i < N / 2; i++)
      | ^~~
a.cc:2:17: error: 'i' does not name a type
    2 | for (int i = 0; i < N / 2; i++)
      |                 ^
a.cc:2:28: error: 'i' does not name a type
    2 | for (int i = 0; i < N / 2; i++)
      |                            ^
Language: C++


#include <cstdio>

#include <iostream>
#include <string>
#include <map>
#include <vector>
#include <utility>
#include <array>

#include <boost/format.hpp>
#include <boost/range/irange.hpp>

int main() {
   std::string s;
   std::cin >> s;
   int result = 0;
   for (const unsigned int i : boost::irange(0U, s.length() / 2)) {
      if (s[i] == s[s.length() - i - 1]) {
         continue;
      }
      result++;
   }
   std::cout << result << std::endl;
   return 0;
}


Compiler output:
a.cc:11:10: fatal error: boost/format.hpp: No such file or directory
   11 | #include <boost/format.hpp>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;
public class Main
{
  public stattic void main(String args[]){
    Scanner sc=new Scanner(System.in);
    String s=sc.nextLine();
    int cntr=0;
    for(int i=0,j=s.length()-1;i<s.length()/2;i++,j--)
    {
      if(s.charAt(i)!=s.charAt(j))
        cntr++;
    }
    System.out.println(cntr);
  }
}

Compiler output:
Main.java:4: error: <identifier> expected
  public stattic void main(String args[]){
                ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
int a=s.size();
int b=0;
for (int i = 0; i < s.size(); i++) {
    if(s.at(i)==s.at(a-i)){}
       else{
      b++;}
}
    }
       }

Compiler output:
a.cc:14:8: error: expected declaration before '}' token
   14 |        }
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
int a=s.size();
int b=0;
for (int i = 0; i < s.size(); i++) {
    if(s.at(i)==s.at(a-i)){
       else
      b++;
}
    }
       }

Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: expected '}' before 'else'
   10 |        else
      |        ^~~~
a.cc:9:27: note: to match this '{'
    9 |     if(s.at(i)==s.at(a-i)){
      |                           ^
a.cc: At global scope:
a.cc:14:8: error: expected declaration before '}' token
   14 |        }
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
int a=s.size();
int b=0;
for (int i = 0; i < s.size(); i++) {
    if(s.at(i)==s.at(a-i){
       b++;
}
    }
       }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: expected ')' before '{' token
    9 |     if(s.at(i)==s.at(a-i){
      |       ~                  ^
      |                          )
a.cc:12:5: error: expected primary-expression before '}' token
   12 |     }
      |     ^
Language: C++

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

string s;
cin>>s;
int a=s.size();
int b=0;
for (int i = 0; i < s.size(); i++) {
    if(s.at(i)==s.at(a-i){
       b++;
}
    }

Compiler output:
a.cc:5:1: error: 'cin' does not name a type
    5 | cin>>s;
      | ^~~
a.cc:8:1: error: expected unqualified-id before 'for'
    8 | for (int i = 0; i < s.size(); i++) {
      | ^~~
a.cc:8:17: error: 'i' does not name a type
    8 | for (int i = 0; i < s.size(); i++) {
      |                 ^
a.cc:8:31: error: 'i' does not name a type
    8 | for (int i = 0; i < s.size(); i++) {
      |                               ^
Language: C++

#include <iostream>
uisng namespace std;
 char s[101];
 int main() {
 cin >> s;
 int res = 0;
 int n = strlen(s);
 for (int i = 0; i < n; i++) {
 if (s[i] != s[n - 1 - i]) res++;
 }
cout <<  (res / 2) << endl;
 }

Compiler output:
a.cc:2:1: error: 'uisng' does not name a type
    2 | uisng namespace std;
      | ^~~~~
a.cc: In function 'int main()':
a.cc:5:2: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |  cin >> s;
      |  ^~~
      |  std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:10: error: 'strlen' was not declared in this scope
    7 |  int n = strlen(s);
      |          ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | uisng namespace std;
a.cc:11:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 | cout <<  (res / 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:11:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 | cout <<  (res / 2) << endl;
      |                       ^~~~
      |                       std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C

#include <stdio.h>
#include <string.h>

int main(){
    char s[101];
    scanf("%s",$s);

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

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:16: error: '$s' undeclared (first use in this function); did you mean 's'?
    6 |     scanf("%s",$s);
      |                ^~
      |                s
main.c:6:16: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
typedef long long ll;
const int maxn = 1005;
char a[1005];
int ans;
int main(){
	gets(a);
	int n = strlen(a);
	int cnt = n-1;
	for(int i = 0; i < n / 2; i++){
		if(a[i] != a[cnt]) ans++;
		cnt--;
	}
	cout << ans << endl;
}

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

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 1005;
char a[1005];
int ans;
int main(){
	gets(a);
	int n = strlen(a);
	int cnt = n-1;
	for(int i = 0; i < n / 2; i++){
		if(a[i] != a[cnt]) ans++;
		cnt--;
	}
	cout << ans << endl;
}

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

#include<iostream>
using namespace std;
int main()
{
    // 整数の入力
    string aa;
    cin >> aa;
  	//vector<string> arr(aa.size());
    int num=0;
    int bbb=0;
    for (int i = 0; i <= std::floor(aa.size()*1.0/2); i++) {
      if (aa[i]!=aa[aa.size()-1-i]){
        num++;
      }
    }
    //

  
    // 出力
    cout << num << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:31: error: 'floor' is not a member of 'std'
   11 |     for (int i = 0; i <= std::floor(aa.size()*1.0/2); i++) {
      |                               ^~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
    // 整数の入力
    string aa;
    cin >> aa;
  	//vector<string> arr(aa.size());
    int num=0;
    int bbb=0;
    for (int i = 0; i <= floor(aa.size()*1.0/2); i++) {
      if (aa[i]!=aa[aa.size()-1-i]){
        num++;
      }
    }
    //

  
    // 出力
    cout << num << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:26: error: 'floor' was not declared in this scope
   11 |     for (int i = 0; i <= floor(aa.size()*1.0/2); i++) {
      |                          ^~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
    // 整数の入力
    string aa;
    cin >> aa;
  	//vector<string> arr(aa.size());
    int num=0;
    int bbb=0;
    for (int i = 0; i <= floor(aa.size()/2); i++) {
      if (aa[i]!=aa[aa.size()-1-i]){
        num++;
      }
    }
    //

  
    // 出力
    cout << num << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:26: error: 'floor' was not declared in this scope
   11 |     for (int i = 0; i <= floor(aa.size()/2); i++) {
      |                          ^~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
    // 整数の入力
    string aa;
    cin >> aa;
  	vector<string> arr(aa.size());
    int num=0;
    for (int i = 0; i <= floor(aa.size()/2); i++) {
      arr[i]=(aa[i]);
    }
    //
     int bbb=0;
    for (int i = (aa.size() - 1); i >= floor(aa.size()/2); i--) {
      if (aa[i]!=arr[bbb]){
        num++;
      }
      bbb++;
    }
  
    // 出力
    cout << num << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'vector' was not declared in this scope
    8 |         vector<string> arr(aa.size());
      |         ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:8:22: error: expected primary-expression before '>' token
    8 |         vector<string> arr(aa.size());
      |                      ^
a.cc:8:24: error: 'arr' was not declared in this scope
    8 |         vector<string> arr(aa.size());
      |                        ^~~
a.cc:10:26: error: 'floor' was not declared in this scope
   10 |     for (int i = 0; i <= floor(aa.size()/2); i++) {
      |                          ^~~~~
a.cc:15:40: error: 'floor' was not declared in this scope
   15 |     for (int i = (aa.size() - 1); i >= floor(aa.size()/2); i--) {
      |                                        ^~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
    // 整数の入力
    string aa;
    cin >> aa;
  	vector<string> arr(aa.size());
    int num=0;
    for (int i = 0; i <= floor(aa.size()/2); i++) {
      arr[i]=(aa[i]);
    }
    for (int i = (aa.size() - 1); i >= floor(aa.size()/2); i--) {
      if (aa[i]!=arr[i]){
        num++;
      }
    }
  
    // 出力
    cout << num << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'vector' was not declared in this scope
    8 |         vector<string> arr(aa.size());
      |         ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:8:22: error: expected primary-expression before '>' token
    8 |         vector<string> arr(aa.size());
      |                      ^
a.cc:8:24: error: 'arr' was not declared in this scope
    8 |         vector<string> arr(aa.size());
      |                        ^~~
a.cc:10:26: error: 'floor' was not declared in this scope
   10 |     for (int i = 0; i <= floor(aa.size()/2); i++) {
      |                          ^~~~~
a.cc:13:40: error: 'floor' was not declared in this scope
   13 |     for (int i = (aa.size() - 1); i >= floor(aa.size()/2); i--) {
      |                                        ^~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
    // 整数の入力
    string aa;
    cin >> aa;
  	vector<string> arr(aa.size());
    int num=0;
    for (int i = 0; i <= floor(aa.size()/2); i++) {
      arr[i]=(aa[i]);
    }
    for (int i = floor(aa.size()/2); i < (aa.size()); i++) {
      if (aa[i]!=arr[i]){
        num++;
      }
    }
  
    // 出力
    cout << num << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'vector' was not declared in this scope
    8 |         vector<string> arr(aa.size());
      |         ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:8:22: error: expected primary-expression before '>' token
    8 |         vector<string> arr(aa.size());
      |                      ^
a.cc:8:24: error: 'arr' was not declared in this scope
    8 |         vector<string> arr(aa.size());
      |                        ^~~
a.cc:10:26: error: 'floor' was not declared in this scope
   10 |     for (int i = 0; i <= floor(aa.size()/2); i++) {
      |                          ^~~~~
a.cc:13:18: error: 'floor' was not declared in this scope
   13 |     for (int i = floor(aa.size()/2); i < (aa.size()); i++) {
      |                  ^~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
    // 整数の入力
    string aa;
    cin >> aa;
  	vector<int> arr(aa.size());
    int num=0;
    for (int i = 0; i <= floor(aa.size()/2); i++) {
      arr[i]=(aa[i]);
    }
    for (int i = floor(aa.size()/2); i < (aa.size()); i++) {
      if (aa[i]!=arr[i]){
        num++;
      }
    }
  
    // 出力
    cout << num << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'vector' was not declared in this scope
    8 |         vector<int> arr(aa.size());
      |         ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:8:16: error: expected primary-expression before 'int'
    8 |         vector<int> arr(aa.size());
      |                ^~~
a.cc:10:26: error: 'floor' was not declared in this scope
   10 |     for (int i = 0; i <= floor(aa.size()/2); i++) {
      |                          ^~~~~
a.cc:11:7: error: 'arr' was not declared in this scope
   11 |       arr[i]=(aa[i]);
      |       ^~~
a.cc:13:18: error: 'floor' was not declared in this scope
   13 |     for (int i = floor(aa.size()/2); i < (aa.size()); i++) {
      |                  ^~~~~
a.cc:14:18: error: 'arr' was not declared in this scope
   14 |       if (aa[i]!=arr[i]){
      |                  ^~~
Language: C++

#include <iostream>
using namespace std;
int main(void){
    
    string S;
    cin >> S;
    int count = 0, S_end = S.size() - 1;
    
    for(int i = 0; i < S.size()/2; i++){
        if(S[i] != S[S_end - i]){
            count++;
        }
        
        cout << count << endl;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:15:6: error: expected '}' at end of input
   15 |     }
      |      ^
a.cc:3:15: note: to match this '{'
    3 | int main(void){
      |               ^
Language: C++

#include <iostream>
using namespace std;
int main(void){
    
    string S;
    cin >> S;
    int count = 0, S_end = S.size() - 1;
    
    for(int i = 0; i < S.size()/2; i++){
        if(S[i] != S[S_end - i]){
            count++;
        }
            
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:14:6: error: expected '}' at end of input
   14 |     }
      |      ^
a.cc:3:15: note: to match this '{'
    3 | int main(void){
      |               ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  char st;
  int counter;
  cin >> st;
  int n = st.length;
  for(int i=0;i<=(int)((n-1)/2);i++){
    if(st[i] == st[n-i-1]) counter++
  }
  cout << counter << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: request for member 'length' in 'st', which is of non-class type 'char'
    7 |   int n = st.length;
      |              ^~~~~~
a.cc:9:10: error: invalid types 'char[int]' for array subscript
    9 |     if(st[i] == st[n-i-1]) counter++
      |          ^
a.cc:9:19: error: invalid types 'char[int]' for array subscript
    9 |     if(st[i] == st[n-i-1]) counter++
      |                   ^
a.cc:9:37: error: expected ';' before '}' token
    9 |     if(st[i] == st[n-i-1]) counter++
      |                                     ^
      |                                     ;
   10 |   }
      |   ~
Language: C++

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

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

s = input()

n = len(s)//2

j = len(s) - 1

ans = 0



for i in range(n)  :
	if s[i] != s[j] :
		ans+=1
	j = j - 1

print(ans)


Compiler output:
a.cc:1:1: error: 's' does not name a type
    1 | s = input()
      | ^
Language: C++

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

int main()
{
	string str;
	int ans = 0;

	cin >> str;
	for (int i = 0; i < (str.length() / 2); i++)
	{
		if (str[i] != str[(str.length() - 1) - i])
		{
			ans++;
		}
	}

	cout << ans << endl;
	return 0;
}

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

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

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

import java.io.*;
public class Main{
  public static void main(String[] args) throws IOExeption{
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    String s = reader.readLine();
    int i = 0;
    int j = s.length()-1;
    int res=0;
    while(i!=j){
      if(s.charAt(i)==s.charAt(j)){
        i++;
        j--;
        continue;
      }
      else{
        res++;}}}}

Compiler output:
Main.java:3: error: cannot find symbol
  public static void main(String[] args) throws IOExeption{
                                                ^
  symbol:   class IOExeption
  location: class Main
1 error
Language: C

a_str = input()
b_str = a_str[::-1]
c_list= []

for i in range(0,len(a_str)):
    if a_str[i] != b_str[i]:
        c_list.append(a_str[i])

print(int(len(c_list)/2))

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a_str = input()
      | ^~~~~
main.c:1:1: error: type defaults to 'int' in declaration of 'a_str' [-Wimplicit-int]
main.c:1:9: error: implicit declaration of function 'input' [-Wimplicit-function-declaration]
    1 | a_str = input()
      |         ^~~~~
main.c:1:9: error: initializer element is not constant
main.c:2:1: error: expected ',' or ';' before 'b_str'
    2 | b_str = a_str[::-1]
      | ^~~~~
Language: Java

public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		String s = scan.next();

		int count = 0;

		for (int i = 0; i < s.length() / 2; i++) {
			if (!(s.charAt(i) == s.charAt(s.length() - 1 - i))) {
				count++;
			}

		}
		System.out.println(count);
	}
}

Compiler output:
Main.java:4: error: cannot find symbol
		Scanner scan = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		Scanner scan = new Scanner(System.in);
		                   ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.Scanner;

public class Palindrome_philia {

	public static void main(String[] args) throws Exception {

		Scanner scn = new Scanner(System.in);
		String str = scn.nextLine();

		str = str.toLowerCase();

		int count = 0;
		int sl = str.length();
		int i = 0, j = sl - 1;

		if ((sl < 1) || (sl > 100)) {
			throw new Exception("Invalid Input String Length");
		} else {
			while (i <= j) {

				if ((str.charAt(i)) != (str.charAt(j))) {
					count++;
				}
				i++;
				j--;
			}
			System.out.println(count);
		}
	}
}

Compiler output:
Main.java:3: error: class Palindrome_philia is public, should be declared in a file named Palindrome_philia.java
public class Palindrome_philia {
       ^
1 error
Language: Java

import java.util.Scanner;

public class Palindrome_147_B {

	public static void main(String[] args) throws Exception {

      	Scanner scn = new Scanner(System.in);
		String str = scn.nextLine();

		int count = 0;
		int sl = str.length();
		int i = 0, j = sl - 1;

		if ((sl < 1) || (sl > 100)) {
			throw new Exception("Invalid Input String Length");
		} else {
			while (i <= j) {

				if (str.charAt(i) != str.charAt(j)) {
					count++;
				}
				i++;
				j--;
			}
			System.out.println(count);
		}
	}
}

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

#include<bits/stdc++.h>

void main()
{
char s[101];
  cin>>s;
  int i=0;
  while(a[i]!='\0')
  {
i++
  }
 int  n =i-1;
  int c=0;
  for(int i=0,j=n;i<=j;i++,j--)
  {
    if(a[i]!=a[j])
      c++;
  }
  cout<<c<<endl;
}

Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main()
      | ^~~~
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>>s;
      |   ^~~
      |   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:9: error: 'a' was not declared in this scope
    8 |   while(a[i]!='\0')
      |         ^
a.cc:10:4: error: expected ';' before '}' token
   10 | i++
      |    ^
      |    ;
   11 |   }
      |   ~ 
a.cc:16:8: error: 'a' was not declared in this scope
   16 |     if(a[i]!=a[j])
      |        ^
a.cc:19:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   19 |   cout<<c<<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:19:12: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   19 |   cout<<c<<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<stdio.h>
#include<string.h>
int main(void)
{
  char s[105];
  int i,j=0,k;
  scanf("%s",s);
  k = strlen(s);
  for(i=0;i<k;i++)
  {
   if(s[i] != s[n-1-i])
     j++;
  }
  printf("%d\n",j); 
 return 0; 
}

Compiler output:
main.c: In function 'main':
main.c:11:17: error: 'n' undeclared (first use in this function)
   11 |    if(s[i] != s[n-1-i])
      |                 ^
main.c:11:17: note: each undeclared identifier is reported only once for each function it appears in