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

#include<stdio.h>
int main()
{
  char A[4],B[4];
  int count=0;
  for(i=0;i<=2;i++)
  {
    scanf("%c",A[i]);
  }
  for(i=0;i<=2;i++)
  {
    scanf("%c",B[i]);
  }
  for(i=0;i<=2;i++)
  {
    if(A[i]==B[i]
       { 
         count=count+1;
       }
       }
    printf("%d",count);
       }

Compiler output:
main.c: In function 'main':
main.c:6:7: error: 'i' undeclared (first use in this function)
    6 |   for(i=0;i<=2;i++)
      |       ^
main.c:6:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:18: error: expected ')' before '{' token
   16 |     if(A[i]==B[i]
      |       ~          ^
      |                  )
   17 |        {
      |        ~          
main.c:20:8: error: expected expression before '}' token
   20 |        }
      |        ^
Language: C++

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


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

  int counter = 0;
  if (S[0] == T[0]) ++counter;
  if (S[1] == T[1]) ++counter;
  if (S[2] =a= T[2]) ++counter;


  cout << counter << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: 'a' was not declared in this scope
   13 |   if (S[2] =a= T[2]) ++counter;
      |             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	string s1,s2;
	cin>>s1>>s2;
	int t=0;
	for(int i=0;i<s.size();i++)
	if(s1[i]==s2[i]) t++;
	cout<<t;
	return 0;
}

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

#include<stdio.h>
#include<string.h>
int main()
{
    char s[4],s2[4];
    int i,count=0;
        scanf("%s",s);
        scanf("%s",s2);
        toupper(s);
        toupper(s2);

    for(i=0;i<3;i++){
        if(s[i]==s2[i])
            count++;
    }
    printf("%d\n",count);
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'toupper' was not declared in this scope
    9 |         toupper(s);
      |         ^~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string s1,s2;
  int ans=0;
  cin>>s1>>s2;
  for(int i=0;i<3;i++)
  {
   if(s1[i]==s2[i])
     ans++
  }
  cout<<ans;
  
 return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: expected ';' before '}' token
   11 |      ans++
      |           ^
      |           ;
   12 |   }
      |   ~
Language: Java

import java.util.*;
 
 public class forcaste {
   	public static void main (String arg[]){
      	Scanner in = new Scanner (System.in);
       	String s = in.nextLine();
      	String t = in.nextLine();
      	
       int count =0;
      for(int i =0; i<3; i++)
      	if (s.charAt(i)==t.charAt(i)){
          count++;
        }
      
      System.out.println(count);
      
      
    }
   
 }

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

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

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

    int counter = 0;
    if (S[0] == T[0] ++counter;
    if (S[1] == T[1]) ++counter;
    if (S[2] == T[2]) ++counter;
    cout << counter << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: expected ';' before 'counter'
   12 |     if (S[0] == T[0] ++counter;
      |                        ^~~~~~~
      |                        ;
a.cc:13:5: error: expected primary-expression before 'if'
   13 |     if (S[1] == T[1]) ++counter;
      |     ^~
a.cc:12:32: error: expected ')' before 'if'
   12 |     if (S[0] == T[0] ++counter;
      |        ~                       ^
      |                                )
   13 |     if (S[1] == T[1]) ++counter;
      |     ~~
Language: C++

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

int main() {
  string S = S, C, R;
  string T = s, c, r;
  cin >> S, T; 

  int counter = 0;
  if (S[0] = T[0]) ++counter;
  if (S[1] = T[1]) ++counter;
  if (S[2] = T[2]) ++counter;


  cout << counter << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: 's' was not declared in this scope
    7 |   string T = s, c, r;
      |              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define watch(x) cout << (#x) << " is " << (x) << endl


int main(){
	string s,t;
	cin >> s >> t;
	int cnt=0;
	for(int i(0);i<n3;++i){
		if(s[i]==t[i]) cnt++;
	}
	cout << cnt;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: 'n3' was not declared in this scope
   10 |         for(int i(0);i<n3;++i){
      |                        ^~
Language: Java

import java.io.*;
import java.util.*;
public class Atcoderone{
    public static void main(String args[] ) throws Exception {
        Scanner sc = new Scanner(System.in);
  		String s = sc.next();
  		String t = sc.next();
  		int c=0;
  		for(int i=0;i<s.length();i++){
  			for(int j=i;j<t.length();j++){
  				if(s.charAt(i) == t.charAt(j))
  					c++;
  				break;
  			}
  		}
  		System.out.print(c);
    }
}

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

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

        String inputS = new java.util.Scanner(System.in).nextLine();
        String[] arS = inputS.split("");
        String inputT = new java.util.Scanner(System.in).nextLine();
        String[] arT = inputT.split("");

        String[] S = new String[3];
        String[] T = new String[3];
        for (int i = 0; i < 3; i++) {
            S[i] = arS[i];
            T[i] = arT[i];
        }

        int m = 0;

        for(int j=0; j<3; j++) {
            if (S[j].equals(T[j])){
                m++;
            }
        }

        System.out.println(m);
    }
}


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

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

int main() {
  string S = S, C, R;
  string T = s, c, r;
  cin >> S, T; 

  int counter = 0;
  if (S[0] == T[0]) ++counter;
  if (S[1] == T[1]) ++counter;
  if (S[2] == T[2]) ++counter;


  cout << counter << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: 's' was not declared in this scope
    7 |   string T = s, c, r;
      |              ^
Language: Java

public class A-Tenki {
    public static void main(String[] args) {

        String inputS = new java.util.Scanner(System.in).nextLine();
        String[] arS = inputS.split("");
        String inputT = new java.util.Scanner(System.in).nextLine();
        String[] arT = inputT.split("");

        String[] S = new String[3];
        String[] T = new String[3];
        for (int i = 0; i < 3; i++) {
            S[i] = arS[i];
            T[i] = arT[i];
        }

        int m = 0;

        for(int j=0; j<3; j++) {
            if (S[j].equals(T[j])){
                m++;
            }
        }

        System.out.println(m);
    }
}


Compiler output:
Main.java:1: error: '{' expected
public class A-Tenki {
              ^
1 error
Language: C++

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

int main() {
  string S = S, C, R;
  string T = S, C, R;
  cin >> S, T; 

  int counter = 0;
  if (S[0] == T[0]) ++counter;
  if (S[1] == T[1]) ++counter;
  if (S[2] == T[2]) ++counter;


  cout << counter << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: redeclaration of 'std::string C'
    7 |   string T = S, C, R;
      |                 ^
a.cc:6:17: note: 'std::string C' previously declared here
    6 |   string S = S, C, R;
      |                 ^
a.cc:7:20: error: redeclaration of 'std::string R'
    7 |   string T = S, C, R;
      |                    ^
a.cc:6:20: note: 'std::string R' previously declared here
    6 |   string S = S, C, R;
      |                    ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define int long long
#define FOR(i, a, b) for(ll i = (a); i < (b); ++i)
#define FORR(i, a, b) for(ll i = (a); i > (b); --i)
#define REP(i, n) for(ll i = 0; i < (n); ++i)
#define REPR(i, n) for(ll i = n; i >= 0; i--)
#define FOREACH(x, a) for(auto &(x) : (a))
#define VECCIN(x)                                                              \
    for(auto &youso_ : (x)) cin >> youso_
#define bitcnt __builtin_popcount
#define SZ(x) ((ll)(x).size())
#define fi first
#define se second
#define All(a) (a).begin(), (a).end()
#define rAll(a) (a).rbegin(), (a).rend()
template <typename T = long long> inline T IN() {
    T x;
    cin >> x;
    return (x);
}
inline void CIN() {}
template <class Head, class... Tail>
inline void CIN(Head &&head, Tail &&... tail) {
    cin >> head;
    CIN(move(tail)...);
}
#define CCIN(...)                                                              \
    char __VA_ARGS__;                                                          \
    CIN(__VA_ARGS__)
#define DCIN(...)                                                              \
    double __VA_ARGS__;                                                        \
    CIN(__VA_ARGS__)
#define LCIN(...)                                                              \
    ll __VA_ARGS__;                                                            \
    CIN(__VA_ARGS__)
#define SCIN(...)                                                              \
    string __VA_ARGS__;                                                        \
    CIN(__VA_ARGS__)
#define Yes(a) cout << (a ? "Yes" : "No") << "\n"
#define YES(a) cout << (a ? "YES" : "NO") << "\n"
#define Printv(v)                                                              \
    {                                                                          \
        FOREACH(x, v) { cout << x << " "; }                                    \
        cout << "\n";                                                          \
    }
template <typename T = string> inline void eputs(T s) {
    cout << s << "\n";
    exit(0);
}
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
    std::fill((T *)array, (T *)(array + N), val);
}
template <typename T> using PQG = priority_queue<T, vector<T>, greater<T>>;
template <typename T> using PQ = priority_queue<T>;

typedef long long ll;
typedef pair<ll, ll> PL;
typedef vector<PL> VPL;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef vector<double> VD;

const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
const double PI = atan(1.0) * 4.0;
const ll dx[] = {1, 1, 0, -1, -1, -1, 0, 1};
const ll dy[] = {0, 1, 1, 1, 0, -1, -1, -1};
#define PI 3.141592653589793238

void cinfast() {
    cin.tie(0);
    ios::sync_with_stdio(false);
}

ll N;

signed main() {
    SCIN(S,T);
    ll cnt=0;
    REP(i,3){
        if(S[i]==T[i]) cnt++;
    }
    cout << cnt << "\n"
}


Compiler output:
a.cc: In function 'int main()':
a.cc:88:24: error: expected ';' before '}' token
   88 |     cout << cnt << "\n"
      |                        ^
      |                        ;
   89 | }
      | ~
Language: C++

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


int main() {
  string S, C, R;
  S = S, C, R; T = S, C, R;
  cin >> S, T; 

  int counter = 0;
  if (S[0] == T[0]) ++counter;
  if (S[1] == T[1]) ++counter;
  if (S[2] == T[2]) ++counter;


  cout << counter << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: 'T' was not declared in this scope
    8 |   S = S, C, R; T = S, C, R;
      |                ^
Language: C++

    #include<iostream>
    using namespace std;
    int main(){
    string S;
      string T;
      cin>>S;
      cin>>T;
      int count=0;
      for(i=1;i<=S;i++){
      for(j=1;j<=S;j++)
        if(S[i]=T[j]){
        count++;
        }
        
      }
      cout<<count<<endl;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: 'i' was not declared in this scope
    9 |       for(i=1;i<=S;i++){
      |           ^
a.cc:10:11: error: 'j' was not declared in this scope
   10 |       for(j=1;j<=S;j++)
      |           ^
Language: Java

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

        String inputS = new java.util.Scanner(System.in).nextLine();
        String[] arS = inputS.split("");
        String inputT = new java.util.Scanner(System.in).nextLine();
        String[] arT = inputT.split("");

        String[] S = new String[3];
        String[] T = new String[3];
        for (int i = 0; i < 3; i++) {
            S[i] = arS[i];
            T[i] = arT[i];
        }

        int m = 0;

        for(int j=0; j<3; j++) {
            if (S[j].equals(T[j])){
                m++;
            }
        }

        System.out.println(m);
    }
}

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

#include<bits/stdc++.h>
using namespce std;
int main()
{
  string s,t;
  cin>>s>>t;
  int ans=0;
  for(int i=0;i<3;i++)
  {
    if(s[i]==t[i]) ans++;
  }
  cout<<ans;
  return 0;
}

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

int main(){
 string s;
 string t;
 cin >> s;
 cin >> t;
 int c = 0;
 int i;
 for (i = 0; i< 3; i++){ 
  if(s[i] == t[i]) c ++;
 }
 cout << c << "\n";
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:2: error: 'string' was not declared in this scope
    2 |  string s;
      |  ^~~~~~
a.cc:3:8: error: expected ';' before 't'
    3 |  string t;
      |        ^~
      |        ;
a.cc:4:2: error: 'cin' was not declared in this scope
    4 |  cin >> s;
      |  ^~~
a.cc:4:9: error: 's' was not declared in this scope
    4 |  cin >> s;
      |         ^
a.cc:5:9: error: 't' was not declared in this scope
    5 |  cin >> t;
      |         ^
a.cc:11:2: error: 'cout' was not declared in this scope
   11 |  cout << c << "\n";
      |  ^~~~
Language: C++

#include<iostream>

using namespace std;

int main()
{
  int S,T;
  cin >> S >> T;
  
  int right_count = 0;
  
  for(int i = 0; i < 3; i ++)
     if(S[i] == T[i])
       right_count ++;
  cout << right_count << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: invalid types 'int[int]' for array subscript
   13 |      if(S[i] == T[i])
      |          ^
a.cc:13:18: error: invalid types 'int[int]' for array subscript
   13 |      if(S[i] == T[i])
      |                  ^
Language: Java

import java.io.*;
import java.util.*;
public class Atcoderone{
    public static void main(String args[] ) throws Exception {
        Scanner sc = new Scanner(System.in);
  		String s = sc.next();
  		String t = sc.next();
  		int c=0;
  		for(int i=0;i<3;i++){
  			for(int j=0;j<3;j++){
  				if(s.charAt(i) != t.charAt(j))
  					c++;
  				break;
  			}
  		}
  		System.out.print(c);
    }
}

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

#include <algorithm>
using namespace std;

int main(){
    char a[4],b[4];
    int c = 0;
    cin  >> a;
    cin  >> b;

for(int i = 0; i < 3; i++){
  if(a[i] == b[i]){
    c++;
  }
}
 cout << c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin  >> a;
      |     ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <algorithm>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:15:2: error: 'cout' was not declared in this scope
   15 |  cout << c << endl;
      |  ^~~~
a.cc:15:2: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:15: error: 'endl' was not declared in this scope
   15 |  cout << c << endl;
      |               ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <algorithm>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: C++

#include <bits/stdc++.h>
using namespace std;
void main()
{ String s1;
 String s2;
 int count=0;
 cin>>s1;
 cin>>s2;
 for(int i=0;i<n;i++)
 {  
   if(s1[i]==s2[i]
      count++;
 }
      cout<<count;
}

Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:4:3: error: 'String' was not declared in this scope
    4 | { String s1;
      |   ^~~~~~
a.cc:5:8: error: expected ';' before 's2'
    5 |  String s2;
      |        ^~~
      |        ;
a.cc:7:7: error: 's1' was not declared in this scope; did you mean 'y1'?
    7 |  cin>>s1;
      |       ^~
      |       y1
a.cc:8:7: error: 's2' was not declared in this scope
    8 |  cin>>s2;
      |       ^~
a.cc:9:16: error: 'n' was not declared in this scope
    9 |  for(int i=0;i<n;i++)
      |                ^
a.cc:13:2: error: expected primary-expression before '}' token
   13 |  }
      |  ^
a.cc:12:15: error: expected ')' before '}' token
   12 |       count++;
      |               ^
      |               )
   13 |  }
      |  ~             
a.cc:11:6: note: to match this '('
   11 |    if(s1[i]==s2[i]
      |      ^
a.cc:13:2: error: expected primary-expression before '}' token
   13 |  }
      |  ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
 string s,t;
  cin>>s>>t;
  ll jwb=0;
  for(int i=0;i<3;i++)if(s[i]==t[i])jwb++;
  cout << jwb <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'll' was not declared in this scope
    6 |   ll jwb=0;
      |   ^~
a.cc:7:37: error: 'jwb' was not declared in this scope
    7 |   for(int i=0;i<3;i++)if(s[i]==t[i])jwb++;
      |                                     ^~~
a.cc:8:11: error: 'jwb' was not declared in this scope
    8 |   cout << jwb <<endl;
      |           ^~~
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		String foc=scan.next();
		String real=scan.next();
		int count=0;
		for(int i=0;i<3;i++) {
			if(foc.charAt(i)==real.charAt(i)) {
				count++;
			}
		}
		System.out.println(count);
		
	}


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

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


int main() {
  string　S, T = S, C, R;
  cin >> S, C, R; 

  int counter = 0;
  if (S[0] == T[0]) ++counter;
  if (S[1] == T[1]) ++counter;
  if (S[2] == T[2]) ++counter;


  cout << counter << endl;
}


Compiler output:
a.cc:7:3: error: extended character 　 is not valid in an identifier
    7 |   string　S, T = S, C, R;
      |   ^
a.cc: In function 'int main()':
a.cc:7:3: error: 'string\U00003000S' was not declared in this scope
    7 |   string　S, T = S, C, R;
      |   ^~~~~~~~~
a.cc:7:14: error: 'T' was not declared in this scope
    7 |   string　S, T = S, C, R;
      |              ^
a.cc:7:18: error: 'S' was not declared in this scope
    7 |   string　S, T = S, C, R;
      |                  ^
a.cc:7:21: error: 'C' was not declared in this scope
    7 |   string　S, T = S, C, R;
      |                     ^
a.cc:7:24: error: 'R' was not declared in this scope
    7 |   string　S, T = S, C, R;
      |                        ^
Language: C++

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


int main() {
  string　S, T = S, C, R;
  cin >> S, C, R; 

  int counter = 0;
  if (S[0] == T[0]) ++counter;
  if (S[1] == T[1]) ++counter;
  if (S[2] == T[2]) ++counter;


  cout << counter << endl;
}


Compiler output:
a.cc:6:3: error: extended character 　 is not valid in an identifier
    6 |   string　S, T = S, C, R;
      |   ^
a.cc: In function 'int main()':
a.cc:6:3: error: 'string\U00003000S' was not declared in this scope
    6 |   string　S, T = S, C, R;
      |   ^~~~~~~~~
a.cc:6:14: error: 'T' was not declared in this scope
    6 |   string　S, T = S, C, R;
      |              ^
a.cc:6:18: error: 'S' was not declared in this scope
    6 |   string　S, T = S, C, R;
      |                  ^
a.cc:6:21: error: 'C' was not declared in this scope
    6 |   string　S, T = S, C, R;
      |                     ^
a.cc:6:24: error: 'R' was not declared in this scope
    6 |   string　S, T = S, C, R;
      |                        ^
Language: C++

#include<bits/stdc++.h>
#include<stdio.h>
using namespace std;
int main()
{
    char S[4],T[4];
    int i,j,count=0;
    gets(S);
    gets(T);
    for(i=0;i<3;i++)
        {
            if(S[i]==T[i])
                count++;
        }
    cout<<count<<endl;
}


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

#include<bits/stdc++.h>

using namespace std;

char s1[4],s2[4],i,ans;

int main()
{
	gets(s1);
	gets(s2);
	for(i=0;i<3;i++)
		if(s1[i]==s2[i])
			ans++;
	printf("%d",ans);
	return 0;
}

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

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

int main()
{
	string s;
  	cin >> s;
  	string t;
  	cin >>> t;
  	int cnt=0;
  	for(int i=0;i<3;i++)
    {
    	if(s[i]==t[i])	cnt++;
    }
  	cout << cnt;
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: expected primary-expression before '>' token
    9 |         cin >>> t;
      |               ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <cmath>
#include <utility>
#include <map>
#include <unordered_map>
using namespace std;
typedef long long int ll;

int main() {
  string S,T;
  cin>>S>>T;
  
  int ans=0;
  if(S[0]==T[0])
    ++ans;
  else(S[1]==T[1])
    ++ans;
  else(S[2]==T[2])
    ++ans;
  
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:12: error: lvalue required as increment operand
   20 |   else(S[1]==T[1])
      |       ~~~~~^~~~~~~
a.cc:22:3: error: 'else' without a previous 'if'
   22 |   else(S[2]==T[2])
      |   ^~~~
a.cc:22:12: error: lvalue required as increment operand
   22 |   else(S[2]==T[2])
      |       ~~~~~^~~~~~~
Language: C++

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


int main() {
  string　S, T = S, C, R;
  cin >> S, C, R; 

  int counter = 0;
  if (S[0] == T[0]) ++counter;
  if (S[1] == T[1]) ++counter;
  if (S[2] == T[2]) ++counter;

  if () {
    cout << "" << endl;
  }
 
  cout << counter << endl;
}


Compiler output:
a.cc:6:3: error: extended character 　 is not valid in an identifier
    6 |   string　S, T = S, C, R;
      |   ^
a.cc: In function 'int main()':
a.cc:6:3: error: 'string\U00003000S' was not declared in this scope
    6 |   string　S, T = S, C, R;
      |   ^~~~~~~~~
a.cc:6:14: error: 'T' was not declared in this scope
    6 |   string　S, T = S, C, R;
      |              ^
a.cc:6:18: error: 'S' was not declared in this scope
    6 |   string　S, T = S, C, R;
      |                  ^
a.cc:6:21: error: 'C' was not declared in this scope
    6 |   string　S, T = S, C, R;
      |                     ^
a.cc:6:24: error: 'R' was not declared in this scope
    6 |   string　S, T = S, C, R;
      |                        ^
a.cc:14:7: error: expected primary-expression before ')' token
   14 |   if () {
      |       ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main()
{
  int A;
  int B;
  
  cin >> A;
  cin >> B;
  cout << (B-1)/(A-1) << end1;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:26: error: 'end1' was not declared in this scope
   11 |   cout << (B-1)/(A-1) << end1;
      |                          ^~~~
Language: C++

#include<stdio.h>
#include<string.h>
#include <iostream>
 
void compare(String A[],String B[]){
    int a = 0;
    if(A[0] == B[0]){
        a +=1;
    }
    if(A[1] == B[1]){
        a +=1;
    }
    if(A[2] == B[2]){
        a +=1;
    }
 
 
    printf("%d", a);
        
}
 
int main(){
    int i, N;
    String A[3];
    String B[3];
    for(i=0; i<2; i++) scanf("%d", &A[i]);
    for(i=0; i<2; i++) scanf("%d", &B[i]);
 
    compare(A,B);
    return 0;
}

Compiler output:
a.cc:5:6: error: variable or field 'compare' declared void
    5 | void compare(String A[],String B[]){
      |      ^~~~~~~
a.cc:5:14: error: 'String' was not declared in this scope
    5 | void compare(String A[],String B[]){
      |              ^~~~~~
a.cc:5:25: error: 'String' was not declared in this scope
    5 | void compare(String A[],String B[]){
      |                         ^~~~~~
a.cc: In function 'int main()':
a.cc:24:5: error: 'String' was not declared in this scope
   24 |     String A[3];
      |     ^~~~~~
a.cc:25:11: error: expected ';' before 'B'
   25 |     String B[3];
      |           ^~
      |           ;
a.cc:26:37: error: 'A' was not declared in this scope
   26 |     for(i=0; i<2; i++) scanf("%d", &A[i]);
      |                                     ^
a.cc:27:37: error: 'B' was not declared in this scope
   27 |     for(i=0; i<2; i++) scanf("%d", &B[i]);
      |                                     ^
a.cc:29:13: error: 'A' was not declared in this scope
   29 |     compare(A,B);
      |             ^
a.cc:29:15: error: 'B' was not declared in this scope
   29 |     compare(A,B);
      |               ^
a.cc:29:5: error: 'compare' was not declared in this scope
   29 |     compare(A,B);
      |     ^~~~~~~
Language: C++

/* ****mittal**** */
#include<bits/stdc++.h>
#define ll          long long int 
#define pb          push_back
#define endl        '\n'
#define pii         pair<ll int,ll int>
#define vi          vector<ll int>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (ll int)x.size()
#define hell        1000000007
#define rep(i,a,b)    for(ll int i=a;i<b;i++)
#define repr(i,a,b)   for(ll int i=a;i>=b;i--)
#define lbnd    lower_bound
#define ubnd        upper_bound
#define mp          make_pair
using namespace std;

#define N  100005
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int TESTS=1;
//    cin>>TESTS;
    while(TESTS--)
    {
        string s,t;
        cin>>s>>t;
        lll ans=0;
        for(int i=0;i<3;i++)
        {
        	if(s[i]==t[i])
        		ans++;
        }
        cout<<ans;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:9: error: 'lll' was not declared in this scope; did you mean 'all'?
   32 |         lll ans=0;
      |         ^~~
      |         all
a.cc:36:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   36 |                         ans++;
      |                         ^~~
      |                         abs
a.cc:38:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   38 |         cout<<ans;
      |               ^~~
      |               abs
Language: C++

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


int main() {
  string　S, T = S, C, R;
  cin >> S, C, R; 

  if (S[0] == T[0]) ++counter;
  if (S[1] == T[1]) ++counter;
  if (S[2] == T[2]) ++counter;

  if () {
    cout << "" << endl;
  }
 
  cout << counter << endl;
}


Compiler output:
a.cc:6:3: error: extended character 　 is not valid in an identifier
    6 |   string　S, T = S, C, R;
      |   ^
a.cc: In function 'int main()':
a.cc:6:3: error: 'string\U00003000S' was not declared in this scope
    6 |   string　S, T = S, C, R;
      |   ^~~~~~~~~
a.cc:6:14: error: 'T' was not declared in this scope
    6 |   string　S, T = S, C, R;
      |              ^
a.cc:6:18: error: 'S' was not declared in this scope
    6 |   string　S, T = S, C, R;
      |                  ^
a.cc:6:21: error: 'C' was not declared in this scope
    6 |   string　S, T = S, C, R;
      |                     ^
a.cc:6:24: error: 'R' was not declared in this scope
    6 |   string　S, T = S, C, R;
      |                        ^
a.cc:9:23: error: 'counter' was not declared in this scope
    9 |   if (S[0] == T[0]) ++counter;
      |                       ^~~~~~~
a.cc:10:23: error: 'counter' was not declared in this scope
   10 |   if (S[1] == T[1]) ++counter;
      |                       ^~~~~~~
a.cc:11:23: error: 'counter' was not declared in this scope
   11 |   if (S[2] == T[2]) ++counter;
      |                       ^~~~~~~
a.cc:13:7: error: expected primary-expression before ')' token
   13 |   if () {
      |       ^
a.cc:17:11: error: 'counter' was not declared in this scope
   17 |   cout << counter << endl;
      |           ^~~~~~~
Language: C++

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


int main() {
  string S, C, R;
  string　S, T = S, C, R;
  cin >> S, C, R; 

  if (S[0] == T[0]) ++counter;
  if (S[1] == T[1]) ++counter;
  if (S[2] == T[2]) ++counter;

  if () {
    cout << "" << endl;
  }
 
  cout << counter << endl;
}


Compiler output:
a.cc:7:3: error: extended character 　 is not valid in an identifier
    7 |   string　S, T = S, C, R;
      |   ^
a.cc: In function 'int main()':
a.cc:7:3: error: 'string\U00003000S' was not declared in this scope
    7 |   string　S, T = S, C, R;
      |   ^~~~~~~~~
a.cc:7:14: error: 'T' was not declared in this scope
    7 |   string　S, T = S, C, R;
      |              ^
a.cc:10:23: error: 'counter' was not declared in this scope
   10 |   if (S[0] == T[0]) ++counter;
      |                       ^~~~~~~
a.cc:11:23: error: 'counter' was not declared in this scope
   11 |   if (S[1] == T[1]) ++counter;
      |                       ^~~~~~~
a.cc:12:23: error: 'counter' was not declared in this scope
   12 |   if (S[2] == T[2]) ++counter;
      |                       ^~~~~~~
a.cc:14:7: error: expected primary-expression before ')' token
   14 |   if () {
      |       ^
a.cc:18:11: error: 'counter' was not declared in this scope
   18 |   cout << counter << endl;
      |           ^~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
getline(cin,s);
getline(cin,t);
  int a=0,b=0;
if(s>=t){
  for(int i=0;i<t.length();i++){
  if(s[i]==t[i]) a++;
  }
}
  else{
    for(int i=0;i<s.length();i++){
  if(s[i]==t[i]) b++;
  }
  }
  cout<<(a+b)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:13: error: 's' was not declared in this scope
    4 | getline(cin,s);
      |             ^
a.cc:5:13: error: 't' was not declared in this scope; did you mean 'tm'?
    5 | getline(cin,t);
      |             ^
      |             tm
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    char S[4],T[4];
    int i,j,count=0;
    gets(S);
    gets(T);
    for(i=0;i<3;i++)
        {
            if(S[i]==T[i])
                count++;
        }
    cout<<count<<endl;
}


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

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


int main() {
  string S, C, R;
  string　S = S, C, R;
  string　T = S, C, R;
  cin >> S, C, R; 

  if (S[0] == T[0]) ++counter;
  if (S[1] == T[1]) ++counter;
  if (S[2] == T[2]) ++counter;

  if () {
    cout << "" << endl;
  }
 
  cout << counter << endl;
}

Compiler output:
a.cc:7:3: error: extended character 　 is not valid in an identifier
    7 |   string　S = S, C, R;
      |   ^
a.cc:8:3: error: extended character 　 is not valid in an identifier
    8 |   string　T = S, C, R;
      |   ^
a.cc: In function 'int main()':
a.cc:7:3: error: 'string\U00003000S' was not declared in this scope
    7 |   string　S = S, C, R;
      |   ^~~~~~~~~
a.cc:8:3: error: 'string\U00003000T' was not declared in this scope
    8 |   string　T = S, C, R;
      |   ^~~~~~~~~
a.cc:11:15: error: 'T' was not declared in this scope
   11 |   if (S[0] == T[0]) ++counter;
      |               ^
a.cc:11:23: error: 'counter' was not declared in this scope
   11 |   if (S[0] == T[0]) ++counter;
      |                       ^~~~~~~
a.cc:12:15: error: 'T' was not declared in this scope
   12 |   if (S[1] == T[1]) ++counter;
      |               ^
a.cc:12:23: error: 'counter' was not declared in this scope
   12 |   if (S[1] == T[1]) ++counter;
      |                       ^~~~~~~
a.cc:13:15: error: 'T' was not declared in this scope
   13 |   if (S[2] == T[2]) ++counter;
      |               ^
a.cc:13:23: error: 'counter' was not declared in this scope
   13 |   if (S[2] == T[2]) ++counter;
      |                       ^~~~~~~
a.cc:15:7: error: expected primary-expression before ')' token
   15 |   if () {
      |       ^
a.cc:19:11: error: 'counter' was not declared in this scope
   19 |   cout << counter << endl;
      |           ^~~~~~~
Language: C

#include <stdio.h>
 
int main(void){
  int i=0;
  int j=0;
  scanf("%d %d",&i,&j);
  if(j<=1){
    printf("0");
  }
  else{
  printf("%d",(j-i)/(i-1)+1);
  }
  return 0;

Compiler output:
main.c: In function 'main':
main.c:13:3: error: expected declaration or statement at end of input
   13 |   return 0;
      |   ^~~~~~
Language: C

#include <stdio.h>
int main(void)
{
  char* S[3],T[3];
  scanf("%s", S);
  scanf("%s", T);
  for(int i = 0; i++; i <=2){
    if(S[i] == T[i]){
      int* n=0;
      n++;
    }
  }
  printf("%d\n", n);
  return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:8:13: warning: comparison between pointer and integer
    8 |     if(S[i] == T[i]){
      |             ^~
main.c:13:18: error: 'n' undeclared (first use in this function)
   13 |   printf("%d\n", n);
      |                  ^
main.c:13:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<bits/stdc++.h>
using namespace std;
char str[1024];
char strtwo[1024];
int main()
{
	int k=0;
	scanf("%s%s",str,strtwo);
	for(i=0;str[i]!='\0';i++)
	{
		if(str[i]==strtwo[i])
			k++;	
	}
	printf("%d",&k);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'i' was not declared in this scope
    9 |         for(i=0;str[i]!='\0';i++)
      |             ^
Language: C++

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

int main() {
  char chFore[3];
  char chFact[3];
  int count = 0;
  cin >> chFore;
  cin >> chFact;
  
  for(int i = 0; i < 3; i++) {
	if(chFore[i] == chFact[i]) {
      count++;
    }
  }
  
  cout << count << endl;
}

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

import java.util.Scanner;

public class a {
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);

		String input = scanner.nextLine();
		String input2 = scanner.nextLine();

		int j = 0;
		int OK = 0;

		for(String i  : input.split("")) {
			if(i.equals(input2.split("")[j])) {
				OK=OK+1;
			}
			j=j+1;
		}
		System.out.println(OK);
	}
}


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

int main(){
 char s;
 std::cin>>s;
 char t;
 std::cin>>t;
 int c;
 for (int i = 1; i<= 3; i++){ 
  if(S[i] == T[i] ) c++;
 }
 std::cout << c << std::endl;
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:7: error: 'cin' is not a member of 'std'
    3 |  std::cin>>s;
      |       ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main(){
a.cc:5:7: error: 'cin' is not a member of 'std'
    5 |  std::cin>>t;
      |       ^~~
a.cc:5:7: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:6: error: 'S' was not declared in this scope
    8 |   if(S[i] == T[i] ) c++;
      |      ^
a.cc:8:14: error: 'T' was not declared in this scope
    8 |   if(S[i] == T[i] ) c++;
      |              ^
a.cc:10:7: error: 'cout' is not a member of 'std'
   10 |  std::cout << c << std::endl;
      |       ^~~~
a.cc:10:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:25: error: 'endl' is not a member of 'std'
   10 |  std::cout << c << std::endl;
      |                         ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | int main(){
Language: C++

#include <iostream>
using namespace std;

int mani()
{
	string str;
	string str1;
	cin >> str >> str1;
	int ans = 0;
	if(str[0] == str1[0])ans++;
	if(str[1] == str1[1])ans++;
	if(str[2] == str1[2])ans++;
	cout << ans << endl;
	return 0;
}

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<iostream>
using namespace std;
int main(){
string S;
  string T;
  int count=0;
  for(i=1;i<=S;i++){
  for(j=1;j<=S;j++)
    if(S[i]=T[j]){
    count++;
    }
    
  }
  cout<<count<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   for(i=1;i<=S;i++){
      |       ^
a.cc:8:7: error: 'j' was not declared in this scope
    8 |   for(j=1;j<=S;j++)
      |       ^
Language: C++

#include<iostream>
using namespace std;
 
int main(){
 int A,B;
 int i = 0;
 cin >> A >> B;
 while(True){
 	if(A * i >= B){
 		break;
 	}
 	i++;
 }
 cout << i;
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'True' was not declared in this scope
    8 |  while(True){
      |        ^~~~
Language: Java

import java.util.Scanner;

public class main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);

		String input = scanner.nextLine();
		String input2 = scanner.nextLine();

		int j = 0;
		int OK = 0;

		for(String i  : input.split("")) {
			if(i.equals(input2.split("")[j])) {
				OK=OK+1;
			}
			j=j+1;
		}


		System.out.println(OK);
		//System.out.println(input2);

	}

}


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

import java.util.Scanner;

public class main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);

		String input = scanner.nextLine();
		String input2 = scanner.nextLine();

		int j = 0;
		int OK = 0;

		for(String i  : input.split("")) {
			if(i.equals(input2.split("")[j])) {
				OK=OK+1;
			}
			j=j+1;
		}


		System.out.println(OK);
		//System.out.println(input2);

	}


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

#include<bits/stdc++.h>
using namespace std;
int main()
{
    char S[4],T[4];
    int i,j,count=0;
    gets(S);
    gets(T);
    for(i=0;i<3;i++)
        {

            if(S[i]==T[i])
            {
                count++;
            }

        }
    cout<<count<<endl;
 return 0;

}


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

import java.util.*;
public class Tenki {
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                // 整数の入力
                String y = sc.next();
                String j = sc.next();

                int result = 0;
                for (int i = 0; i < y.length(); i++) {
                        if (y.charAt(i) == j.charAt(i)) {
                                result += 1;
                        }
                }

                // 出力
                System.out.println(result);
        }
}

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

import java.util.*
public class Main{
	public static void main(String args[]){
    	Scanner sc = new Scanner(System.in);
        String S = sc.next();
        String T = sc.next();
        int ans = 0;
        for(int i = 0; i < 2; i++){
        	if(S.charAt(i).equals(T.charAt(i)){
            	ans ++;
            }
         }
         System.out.println(ans);
    }
}

Compiler output:
Main.java:1: error: ';' expected
import java.util.*
                  ^
Main.java:9: error: ')' expected
        	if(S.charAt(i).equals(T.charAt(i)){
        	                                  ^
2 errors
Language: C

#include <stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h> 
#define ll long long
#define length 100000   //10万
int compare(const int*a,const int *b);
/*
qsort(array,length,sizeof(int),(int(*)(const int*, const int*))compare);
使う時これ移動
*/
int main(){
    int array[length],N,K;
    int *aryp;
    ll sum=0;
    char chara1[20],chara2[2];
    scanf("%c",chara1[0]);
  scanf("%c",chara1[1]);
  scanf("%c",chara1[2]);
  scanf("%c",chara2[0]);
  scanf("%c",chara2[1]);
  scanf("%c",chara2[2]);
  if(chra1[0]==chara2[0])sum++;
  if(chara1[1]==chara2[1])sum++;
  if(chara1[2]==chara2[2])sum++;
  printf("%d",sum);
    return 0;
}
int compare(const int*a,const int *b){
    if(*a<*b)
      return -1;
    else if(*a>*b)
      return 1;
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:6: error: 'chra1' undeclared (first use in this function); did you mean 'chara1'?
   23 |   if(chra1[0]==chara2[0])sum++;
      |      ^~~~~
      |      chara1
main.c:23:6: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

S = list(map(int, input().split()))
T = list(map(int, input().split()))

i = 0
reslt = 0
for item in S:
    if S[i] == T[i]:
        reslt += 1
    i += 1

print(result)


Compiler output:
a.cc:1:1: error: 'S' does not name a type
    1 | S = list(map(int, input().split()))
      | ^
Language: Java

import java.util.Scanner;
public class d01 {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        String b = sc.next();
        int n=0;
        for(int i =0;i<3;i++){
            if((a.substring(i,i+1)).equals(b.substring(i,i+1)))
                n++;
        }
        System.out.println(n);
    }
}

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

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

int main()
{
  char S[3];
  char T[3];
  int i;
  int sum;
  sum = 1;
  
  cin >> S;
  cin >> T;
     
  for (int i = 0; i < 3; i++){
    if(S[i]==T[i]){
      sum += 1;
    }
  }
  
  cout << sum << endl;
}


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

#include<bits/stdc++.h>
using namespace std;
int main(){
	char a[4],b[4];
	int s=0;
	gets(a);
	gets(b);
	if(a[1]==b[1])
	s++;
	if(a[2]==b[2])
	s++;
	if(a[0]==b[0])
	s++;
	cout<<s;
	return 0;
} 

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(a);
      |         ^~~~
      |         getw
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class TaskA {
    public static void main(String args[]){
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s="", t="";
        try {
            s = br.readLine();
            t = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }

        int count = 0;
        for (int i=0; i<3; i++){
            if (s.charAt(i) == t.charAt(i)){
               count++;
            }
        }

        System.out.println(count);
    }
}


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

#include <stdio.h>

void abc139_a(){
char a[3],b[3];
int c=0;
scanf("%s %s",a,b);
for (int i = 0; i < 3; i++) {
  if (a[i]== b[i]) {
    c++;
  }
}
printf("%d\n",c);
}

int abc139_a() {
  t2481();
  return 0;
}


Compiler output:
a.cc:15:5: error: ambiguating new declaration of 'int abc139_a()'
   15 | int abc139_a() {
      |     ^~~~~~~~
a.cc:3:6: note: old declaration 'void abc139_a()'
    3 | void abc139_a(){
      |      ^~~~~~~~
a.cc: In function 'int abc139_a()':
a.cc:16:3: error: 't2481' was not declared in this scope
   16 |   t2481();
      |   ^~~~~
Language: Java

import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class QuestionA {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String anticipation = sc.next();
		String real = sc.next();
		List<String> AList = Arrays.asList(anticipation.split(""));
		List<String> RList = Arrays.asList(real.split(""));

		int count = 0;
		for (int i = 0; i < 3; i++) {
			String a = AList.get(i);
			String r = RList.get(i);

			if (a.equals(r)) {
				count++;
			}
		}

		System.out.println(count);
	}
}


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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String anticipation = sc.next();
		String real = sc.next();
		List<String> AList = Arrays.asList(anticipation.split(""));
		List<String> RList = Arrays.asList(real.split(""));

		int count = 0;
		for (int i = 0; i < 3; i++) {
			String a = AList.get(i);
			String r = RList.get(i);

			if (a.equals(r)) {
				count++;
			}
		}

		System.out.println(count);
	}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args) {
	              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
	char a[4],b[4];
	int s=0;
	gets(a);
	gets(b);
	if(a[1]&&b[1]&&a[1]==b[1])
	s++;
	if(a[2]&&b[2]&&a[2]==b[2])
	s++;
	if(a[0]&&b[0]&&a[0]==b[0])
	s++;
	cout<<s;
	return 0;
} 

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(a);
      |         ^~~~
      |         getw