criyle/codenet-compile-errors huggingface dataset:
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);
  return 0;
}
  


Compiler output:
main.c: In function 'main':
main.c:13:16: error: 'n' undeclared (first use in this function)
   13 |   printf("%d", n);
      |                ^
main.c:13:16: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
using namespace std;
int main()
{
	string s,t;
    int cnt=0;
    cin >> s >> t;
	for (int i = 0; i < n-1; i++) if(s[i]==t[i]) cnt++;
    cout << cnt;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:29: error: 'n' was not declared in this scope
    8 |         for (int i = 0; i < n-1; i++) if(s[i]==t[i]) cnt++;
      |                             ^
Language: C++

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

Compiler output:
a.cc: In lambda function:
a.cc:10:33: error: expected '{' before ')' token
   10 |                 scanf("%c",t&[i]);
      |                                 ^
a.cc: In function 'int main()':
a.cc:10:29: error: no match for 'operator&' (operand types are 'char [3]' and 'main()::<lambda()>')
   10 |                 scanf("%c",t&[i]);
      |                            ~^~~~
      |                            | |
      |                            | main()::<lambda()>
      |                            char [3]
Language: C++

S = input().split()
T = input().split()
S = list(S[0])
T = list(T[0])

count = 0
for i in range(3):

    if S[i] == T[i]:
        count += 1


print(count)

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

#include <iostream>
#include <string>
using namespace std;
int main()
{
 int i,c;
 c=0;
 string s,t
 cin >> s;
 cin >> t;
 for(i=0;i<=2;i++)
 {
  if(s.at(i)==t.at(i))
  c++;
 }
 cout << c;
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:2: error: expected initializer before 'cin'
    9 |  cin >> s;
      |  ^~~
a.cc:10:9: error: 't' was not declared in this scope
   10 |  cin >> t;
      |         ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
string s,t;
int count=0;
cin>>s>>t;
for(i=0; i<3; i++)
{
  if(s[i]== t[i]){
    count++;
  }
}
cout<<count;
  return 0;
}


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

#include<stdio.h>
#include<string.h>
int main()
{
	char a[3],b[3];
	gets(a);
	gets(b);
	int n=0;
	for(int i=0;i<3;i++)
	{
		if(a[i]==b[i])n++;
	}
	printf("%d",n);
	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: C++

#include<iostream>
using namespace std;
int main()
{
	string s,t;
    int cnt=0;
    cin >> s >> t;
	for (i = 0; i < n-1; i++) if(s[i]==t[i]) cnt++;
    cout << cnt;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: 'i' was not declared in this scope
    8 |         for (i = 0; i < n-1; i++) if(s[i]==t[i]) cnt++;
      |              ^
a.cc:8:25: error: 'n' was not declared in this scope
    8 |         for (i = 0; i < n-1; i++) if(s[i]==t[i]) cnt++;
      |                         ^
Language: C++

#include<iostream>

//using namespace std;
void main(){
	int a, b, c;
	std::string S, T;
	a = 1;

	std::cin >> S >> T;


	if (S[0] == T[0]) {
		a++;
	}
	if (S[1] == T[1]) {
		a++;
	}
	if (S[2] == T[2]) {
		a++;
	}
	std::cout << a << std::endl;
}

Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | void main(){
      | ^~~~
Language: Java

import java.io.*;
import java.util.*;

public class solution
{
  public static void main(String Args[])
  {
    Scanner in = new Scanner(System.in);
    String s = in.next();
    String t = in.next();
    int ans=0;
    for(int i = 0;i<3;i++)
    {
      if(s.charAt(i)!=t.charAt(i))
        ans++;
    }
    System.out.println(ans);
  }
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 'sccanf' was not declared in this scope; did you mean 'sscanf'?
    7 |                 sccanf("%c",s[i]);
      |                 ^~~~~~
      |                 sscanf
a.cc:10:17: error: 'sccanf' was not declared in this scope; did you mean 'sscanf'?
   10 |                 sccanf("%c",t[i]);
      |                 ^~~~~~
      |                 sscanf
Language: C++

#include<iotsream>
using namespace std;
int main()
{
   char s[3],t[3];
   int c=0;
   cin>>s;
   cin>>t;
   for(int i=0;i<3;i++)
   {
      if(s[i]==t[i])
      c++;
   }
  cout<<c;
}

Compiler output:
a.cc:1:9: fatal error: iotsream: No such file or directory
    1 | #include<iotsream>
      |         ^~~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;
public class A {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String T = sc.next();
		
		int ans = 0;
		for (int i = 0; i< 3; i++) {
			if(S.charAt(i) == T.charAt(i)) ans++;
		}
		
		System.out.println(ans);
	}

}


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

#include<stdio.h>
int main(void)
{
	char s[3],t[3];
	int i,c;
	for(i=0;i<3;i++){
		sccanf("%c",&s[i]);
	}
	for(i=0;i<3;i++){
		sccanf("%c",&t[i]);
	}
	c=0;
	for(i=0;i<3;i++){
		if(s[i]==t[i])	c++;
	}
	printf("%d\n",c);
	return 0;
}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 'sccanf' was not declared in this scope; did you mean 'sscanf'?
    7 |                 sccanf("%c",&s[i]);
      |                 ^~~~~~
      |                 sscanf
a.cc:10:17: error: 'sccanf' was not declared in this scope; did you mean 'sscanf'?
   10 |                 sccanf("%c",&t[i]);
      |                 ^~~~~~
      |                 sscanf
Language: C++

yoho = list(input(""))
zitu = list(input(""))

len(yoho)

k = 0
for i in range(len(yoho)):
    if(yoho[i]==zitu[i]):
        k += 1

print(k)

Compiler output:
a.cc:1:1: error: 'yoho' does not name a type
    1 | yoho = list(input(""))
      | ^~~~
Language: C

#include<stdio.h>
int main(){
  char a[3],b[3],count;
  scanf("%s",a);
  scanf("%s",b);
  for(int i = 0;i < 3;i++){
    if(a[i] == b[i]){
      count++
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:14: error: expected ';' before '}' token
    8 |       count++
      |              ^
      |              ;
    9 |     }
      |     ~
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		String c = sc.nextline();
		char[] sChar = new char[3];
		char[] cChar = new char[3];
		int count = 0;
		for(int i = 0; i < 3; i++){
			sChar[i] = s.charAt(i);
			cChar[i] = c.charAt(i);
			if(sChar[i] == cChar[i]){
				count++;
			}
		}
		System.out.println(count);
	}

}

Compiler output:
Main.java:7: error: cannot find symbol
		String c = sc.nextline();
		             ^
  symbol:   method nextline()
  location: variable sc of type Scanner
1 error
Language: C++

#include <iostream>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:22: error: expected ';' before 'sum'
   13 |   else (S[2] == T[2]) sum += 1;
      |                      ^~~~
      |                      ;
Language: C++

#include<iostream>
int main()
{
  string a,b;
  int count=0;
  cin >> a;
  cin >> b;
  for(int i=0;i<(a.size());++i)
  {
    if(a[i]==b[i])
    {
      count++;
    }
  }
  cout << count;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string a,b;
      |   ^~~~~~
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:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> a;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:10: error: 'a' was not declared in this scope
    6 |   cin >> a;
      |          ^
a.cc:7:10: error: 'b' was not declared in this scope
    7 |   cin >> b;
      |          ^
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
      |                  ^~~~
Language: C++

#include<stdio.h>

int main(){
 int S;
 int T;
 int c;
 for (int i = 1; i<= 3; i++){ 
  if(S[i] == T[i] ) c ++;
 }
 return c;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: invalid types 'int[int]' for array subscript
    8 |   if(S[i] == T[i] ) c ++;
      |       ^
a.cc:8:15: error: invalid types 'int[int]' for array subscript
    8 |   if(S[i] == T[i] ) c ++;
      |               ^
Language: C++

#include <iostream>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:22: error: expected ';' before 'sum'
   13 |   else (S[2] == T[2]) sum += 1
      |                      ^~~~
      |                      ;
Language: C++

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

int main(){
  
  string a,b;
  cin>>a>>b;
  if(a==b) cout<<3<<endl;
  else if( (a[0] == b[0] and a[1]!=b[1] and a[2]!=b[2]) || 
          (a[1] == b[1] and a[0]!=b[0] and a[2]!=b[2]) ||
           (a[2] == b[2] and a[1]!=b[1] and a[0]!=b[0])) cout<<1<<endl;
  else cout<<2<<endl;
}
  

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

fun main(args: Array<String>) {
    val S = readLine()!!.split("")
    val T = readLine()!!.split("")

    var cnt = 0
    for (i in 1..3) {
        if (S[i] == T[i]) {
            cnt++
        }
    }
    println(cnt)
}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
fun main(args: Array<String>) {
^
  (use --enable-preview to enable unnamed classes)
Main.java:1: error: <identifier> expected
fun main(args: Array<String>) {
             ^
Main.java:1: error: class, interface, enum, or record expected
fun main(args: Array<String>) {
                    ^
3 errors
Language: C++

#include<iostream>
using namespace std;
int main()
{
  char past[3];
  char present[3];
  int i,count=0;
  for(i=0;i<3;i++)
  {
    cin>>past[i];
  }
  for(i=0;i<3;i++)
  {
    cin>>present[i];
  }
    for(i=0;i<3;i++)
    {
      if(past[i]==present[i])
        count++;
    }
  cout<<count;


Compiler output:
a.cc: In function 'int main()':
a.cc:21:15: error: expected '}' at end of input
   21 |   cout<<count;
      |               ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include<stdio.h>
int main(void)
{
	int s[3],t[3],i,c;
	for(i=0;i<3;i++){
		sccanf("%c",&s[i]);
	}
	for(i=0;i<3;i++){
		sccanf("%c",&t[i]);
	}
	c=0;
	for(i=0;i<3;i++){
		if(s[i]==t[i])	c++;
	}
	printf("%d\n",c);
	return 0;
}
	


Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: 'sccanf' was not declared in this scope; did you mean 'sscanf'?
    6 |                 sccanf("%c",&s[i]);
      |                 ^~~~~~
      |                 sscanf
a.cc:9:17: error: 'sccanf' was not declared in this scope; did you mean 'sscanf'?
    9 |                 sccanf("%c",&t[i]);
      |                 ^~~~~~
      |                 sscanf
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:
a.cc: In function 'int main()':
a.cc:23:6: error: 'chra1' was not declared in this scope; did you mean 'chara1'?
   23 |   if(chra1[0]==chara2[0])sum++;
      |      ^~~~~
      |      chara1
Language: C++

//

#include <iostream>
#include <sstream>
#include <algorithm>
#include <string>
#include <cstring>
#include <tuple>
#include <vector>
#include <set>
#include <map>
#include <iterator>
#include <cmath>

using namespace std;
using lint = long long int;


int main() {
	string predict, actual;
	cin >> predict >> actual;

	int count = 0;
	for (int i = 0; i < predict.length; i++)
		if (predict[i] == actual[i])
			count++;
	cout << count;

	return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:24:37: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   24 |         for (int i = 0; i < predict.length; i++)
      |                             ~~~~~~~~^~~~~~
      |                                           ()
Language: C++

s = input()
t = input()
c = 0

if s[0] == t[0]:
  c += 1

if s[1] == t[1]:
  c += 1

if s[2] == t[2]:
  c += 1
    
print(c)


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

import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		String c = sc.nextline();
		char[] s = new char[3];
		char[] c = new char[3];
		int count = 0;
		for(int i = 0; i < 3; i++){
			s[i] = s.charAt(i);
			c[i] = c.charAt(i);
			if(s[i] == c[i]){
				count++;
			}
		}
		System.out.println(count);
	}

}

Compiler output:
Main.java:7: error: cannot find symbol
		String c = sc.nextline();
		             ^
  symbol:   method nextline()
  location: variable sc of type Scanner
Main.java:8: error: variable s is already defined in method main(String[])
		char[] s = new char[3];
		       ^
Main.java:9: error: variable c is already defined in method main(String[])
		char[] c = new char[3];
		       ^
Main.java:12: error: cannot find symbol
			s[i] = s.charAt(i);
			        ^
  symbol:   method charAt(int)
  location: variable s of type char[]
Main.java:13: error: cannot find symbol
			c[i] = c.charAt(i);
			        ^
  symbol:   method charAt(int)
  location: variable c of type char[]
5 errors
Language: C++

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

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

Compiler output:
a.cc:1:9: fatal error: bits/bits/stdc++.h: No such file or directory
    1 | #include<bits/bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
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);
  return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:8:20: error: expected ')' before ';' token
    8 |     if(S[i] == T[i];){
      |       ~            ^
      |                    )
main.c:13:16: error: 'n' undeclared (first use in this function)
   13 |   printf("%d", n);
      |                ^
main.c:13:16: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream>

using namespace std;

int main(){
  char S, T;
  int sum = 0;
  
  coin >> S >> T;
  
  if (S[0] == T[0]) sum += 1;
  else if(S[1] == T[0]) sum += 1;
  else (S[2] == T[2]) sum += 1
    
  cout << sum << endl;
};

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'coin' was not declared in this scope
    9 |   coin >> S >> T;
      |   ^~~~
a.cc:11:8: error: invalid types 'char[int]' for array subscript
   11 |   if (S[0] == T[0]) sum += 1;
      |        ^
a.cc:11:16: error: invalid types 'char[int]' for array subscript
   11 |   if (S[0] == T[0]) sum += 1;
      |                ^
a.cc:12:12: error: invalid types 'char[int]' for array subscript
   12 |   else if(S[1] == T[0]) sum += 1;
      |            ^
a.cc:12:20: error: invalid types 'char[int]' for array subscript
   12 |   else if(S[1] == T[0]) sum += 1;
      |                    ^
a.cc:13:10: error: invalid types 'char[int]' for array subscript
   13 |   else (S[2] == T[2]) sum += 1
      |          ^
a.cc:13:18: error: invalid types 'char[int]' for array subscript
   13 |   else (S[2] == T[2]) sum += 1
      |                  ^
Language: C

#include <stdio.h>

int main(){
	char a[3];
  	char c;
  	int i,m=0;
  	for(i=0;i<3;i++){
      scanf("%c",&a[i]);
    }
  	for(i=0;i<3;i++){
      scanf("%c",&c);
      if(a[i]==c){
        m++
      }
    }
	printf("%d",m);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:12: error: expected ';' before '}' token
   13 |         m++
      |            ^
      |            ;
   14 |       }
      |       ~
Language: C++

#include<iostream>

using namespace std;

int mian(){
	int a, b, c;
	string S, T;
	a = 1;

	cin >> S >> T;


	if (S[0] == T[0]) {
		a++;
	}
	if (S[1] == T[1]) {
		a++;
	}
	if (S[2] == T[2]) {
		a++;
	}
	cout << a << 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: Java

import java.io.*;
import java.util.*;

class solution
{
  public static void main(String Args[])
  {
    Scanner in = new Scanner(System.in);
    String s = in.nextInt();
    String t = in.nextInt();
    int ans=0;
    for(int i = 0;i<3;i++)
    {
      if(s.charAt(i)!=t.charAt(i))
        ans++;
    }
    System.out.println(ans);
  }
}

Compiler output:
Main.java:9: error: incompatible types: int cannot be converted to String
    String s = in.nextInt();
                         ^
Main.java:10: error: incompatible types: int cannot be converted to String
    String t = in.nextInt();
                         ^
2 errors
Language: C++

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

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

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

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

import java.util.Scanner;
import java.util.ArrayList;
import java.util.Arrays;
public class atcoder {
	static Scanner scn = new Scanner(System.in);
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		String str=scn.nextLine();
		String ori=scn.nextLine();
		int count=0;
		for(int i=0;i<str.length();i++)
		{
			if(str.charAt(i)==ori.charAt(i))
				count++;
		}
		System.out.println(count);
	}

}

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

#include<stdio.h>
 
int main(){
  int a=0; 
  char s[3],t[3];
   scanf("%s", s);
   scanf("%s", t);
   for(int i=0;i<3;i++){
	if(s[i]==t[i]){
      a++;
   }
 
 
  	printf("%d", a);
	return 0;
 
}
#include<stdio.h>
 
int main(){
  int a=0; 
  char s[3],t[3];
   scanf("%s", s);
   scanf("%s", t);
   for(int i=0;i<3;i++){
	if(s[i]==t[i]){
      a++;
   	}
   }

  	printf("%d", a);
	return 0;
 
}


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

include <iostream>

using namespace std;

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

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string S, T;
      |   ^~~~~~
a.cc:9:3: error: 'coin' was not declared in this scope
    9 |   coin >> S >> T;
      |   ^~~~
a.cc:9:11: error: 'S' was not declared in this scope
    9 |   coin >> S >> T;
      |           ^
a.cc:9:16: error: 'T' was not declared in this scope
    9 |   coin >> S >> T;
      |                ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: expected ',' or ';' before ':' token
    6 |   int cnt = 0:
      |              ^
Language: C

#include<iostream.h>
void main()
{int i,j=0;
char a[3],b[3];
scanf(&a[0],&a[1],&a[2]);
scanf(&b[0],&b[1],&b[2]);
for(i=0;i<3;i++)
{if(a[i]==b[i])
j++;}
 printf(j);
}

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

#include<stdio.h>
int main(){
  int ans=0;
  char s[3];
  char t[3];
  for(int i=0;i<3;i++){
  scanf("%s",&s[i]);
  }
  for(int j=0;j<3;j++){
  scanf("%s",&t[j]);
  }
  
  for(int i=0;j<3;j++){
    if(s[i]==s[j]){
      ans++;
    }
  }
  printf("%d",ans);
  return 0;
}

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

#inlclude<iostream>
using namespace std;
int main()
{
  int f=0;
  string s,t;c>>s>>t;
  for(int i=0;i<3;++i)
  {
    if(s[i]==t[i])++f;
  }
  cout<<f;
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlclude; did you mean #include?
    1 | #inlclude<iostream>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string s,t;c>>s>>t;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #inlclude<iostream>
a.cc:6:14: error: 'c' was not declared in this scope
    6 |   string s,t;c>>s>>t;
      |              ^
a.cc:6:17: error: 's' was not declared in this scope
    6 |   string s,t;c>>s>>t;
      |                 ^
a.cc:6:20: error: 't' was not declared in this scope
    6 |   string s,t;c>>s>>t;
      |                    ^
a.cc:11:3: error: 'cout' was not declared in this scope
   11 |   cout<<f;
      |   ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inlclude<iostream>
Language: C++

#include <bits/stdc++.h>
#define int int64_t
#define rp(i, N) for(int i=0; i<N; i++);
using namespace std;
using pair = pair<int, int>;
using tup  = tuple<int, int, int>;
using vec  = vector<int>;
using vvec = vector<vec>;
const int INF = 100000000;
// " ", ' '

// プロトタイプ宣言
// int myfunc(int, vvec);

// グローバル変数
// int N, M;
// vvec data(N, vec(M));

// 関数：

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	
	string S, T;
	cin >> S; cin >> T;

	int ct = 0;
	for(int i=0; i<3; i++) {
		if(S.at(i)==T.at(i)) c += 1;
	}

	cout << ct << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:38: error: 'c' was not declared in this scope
   30 |                 if(S.at(i)==T.at(i)) c += 1;
      |                                      ^
Language: C++

import java.util.*;

public class Main {
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next(), t = sc.next();
		sc.close();
		int cnt = 0;
		for(int i = 0; i < 3; ++i){
			if(s.charAt(i) == t.charAt(i))++cnt;
		}
		System.out.println(cnt);
	}
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<windows.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;

int main(){
	string S, T;
	cin >> S >> T;
	int count=0;
	rep(i, 3) {
		if (S.at(i) == T.at(i))++count;
	}
	cout << count << endl;
}

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

//
//  main.cpp
//  temp
//
//  Created by tolemy on 2019/08/04.
//  Copyright © 2019 tolemy. All rights reserved.
//

#include <iostream>

using namespace std;

int main(int argc, const char * argv[]) {
    
    string s;
    cin >> s;
    
    string t;
    cin >> t;
    
    int count = 0;
    for(int i=0;i<3;i++)
    {
        if(s[i] == t[i]) c++;
    }
    
    cout << count << endl;
    
    return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:24:26: error: 'c' was not declared in this scope
   24 |         if(s[i] == t[i]) c++;
      |                          ^
Language: C

#include<stdio.h>
 
int main(){
  int a=0; 
  char s[3],t[3];
   scanf("%s", s);
   scanf("%s", t);
   for(int i=0;i<3;i++){
	if(s[i]==t[i]){
      a++;
   }


  	printf("%d", a);
	return 0;
 
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: 'c' was not declared in this scope
   10 |     if(s[i]==c[i])
      |              ^
Language: C++

#inlclude<iostream>
using namespace std;
int main()
{
  int f=0;
  string s,t;c>>s>>t;
  for(ll i=0;i<3;++i)
  {
    if(s[i]==t[i])++f;
  }
  cout<<f;
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlclude; did you mean #include?
    1 | #inlclude<iostream>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string s,t;c>>s>>t;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #inlclude<iostream>
a.cc:6:14: error: 'c' was not declared in this scope
    6 |   string s,t;c>>s>>t;
      |              ^
a.cc:6:17: error: 's' was not declared in this scope
    6 |   string s,t;c>>s>>t;
      |                 ^
a.cc:6:20: error: 't' was not declared in this scope
    6 |   string s,t;c>>s>>t;
      |                    ^
a.cc:7:7: error: 'll' was not declared in this scope
    7 |   for(ll i=0;i<3;++i)
      |       ^~
a.cc:7:14: error: 'i' was not declared in this scope
    7 |   for(ll i=0;i<3;++i)
      |              ^
a.cc:11:3: error: 'cout' was not declared in this scope
   11 |   cout<<f;
      |   ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inlclude<iostream>
Language: C++

#include<iostream>

using namespace std;

int mian(){
	int a, b, c;
	string S,T;
	a = 1;

	cin >> S >> T;


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

}

Compiler output:
a.cc: In function 'int mian()':
a.cc:24:1: warning: no return statement in function returning non-void [-Wreturn-type]
   24 | }
      | ^
/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<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll Mod = 1000000007;
const Size = 100005;
int main()
{
    string S, T;
    cin >> S >> T;
    int Count = 0;
    for(int i = 0; i < 3; i++)
    {
        if(S[i] == T[i])
        {
            Count++;
        }
    }
    cout << Count << endl;
    return 0;
}


Compiler output:
a.cc:5:7: error: 'Size' does not name a type; did you mean 'size_t'?
    5 | const Size = 100005;
      |       ^~~~
      |       size_t
Language: C++

#inlucde<bits/stdc++.h>

using namespace 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<<endl;
  return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlucde; did you mean #include?
    1 | #inlucde<bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string s,t;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #inlucde<bits/stdc++.h>
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin>>s>>t;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inlucde<bits/stdc++.h>
a.cc:7:8: error: 's' was not declared in this scope
    7 |   cin>>s>>t;
      |        ^
a.cc:7:11: error: 't' was not declared in this scope
    7 |   cin>>s>>t;
      |           ^
a.cc:12:3: error: 'cout' was not declared in this scope
   12 |   cout<<ans<<endl;
      |   ^~~~
a.cc:12:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:14: error: 'endl' was not declared in this scope
   12 |   cout<<ans<<endl;
      |              ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #inlucde<bits/stdc++.h>
Language: C

#include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <boost/multiprecision/cpp_int.hpp>

using namespace std;
namespace mp = boost::multiprecision;

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

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

	return 0;
}

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'cont' was not declared in this scope; did you mean 'ocnt'?
    9 |             cont++;
      |             ^~~~
      |             ocnt
a.cc:12:13: error: 'cont' was not declared in this scope; did you mean 'ocnt'?
   12 |     cout << cont << "\n";
      |             ^~~~
      |             ocnt
Language: C++

#include<bists/stdc++.h>
using namespace std;
int main(){
string a,b;int co=0;
cin>>a>>b;
for(int i=0;i<2;i++)
    if(a[i]==b[i])
    co++;
cout<<co;
}


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

import core.bitop, std.bitmanip;
import core.checkedint;
import std.algorithm, std.functional;
import std.array, std.container;
import std.bigint;
import std.conv;
import std.math, std.numeric;
import std.range, std.range.interfaces;
import std.stdio, std.string;
import std.typecons;

void main()
{
    auto s = readln.chomp;
    auto t = readln.chomp;
    
    auto ans = zip(s, t).count!(t => t[0] == t[1]);
    
    ans.writeln;
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import core.bitop, std.bitmanip;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import core.checkedint;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import std.algorithm, std.functional;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import std.array, std.container;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import std.bigint;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
    6 | import std.conv;
      | ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:1: error: 'import' does not name a type
    7 | import std.math, std.numeric;
      | ^~~~~~
a.cc:7:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: error: 'import' does not name a type
    8 | import std.range, std.range.interfaces;
      | ^~~~~~
a.cc:8:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:9:1: error: 'import' does not name a type
    9 | import std.stdio, std.string;
      | ^~~~~~
a.cc:9:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:10:1: error: 'import' does not name a type
   10 | import std.typecons;
      | ^~~~~~
a.cc:10:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:12:1: error: '::main' must return 'int'
   12 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:14:14: error: 'readln' was not declared in this scope
   14 |     auto s = readln.chomp;
      |              ^~~~~~
a.cc:17:16: error: 'zip' was not declared in this scope
   17 |     auto ans = zip(s, t).count!(t => t[0] == t[1]);
      |                ^~~
Language: C++

#include <iostream>
#include <bits/stdc++.h>
using namespace std;
#include <math.h>
#define Mod 1000000007
#define INF 1e14
typedef long long int ll;
const ll N=1e5+5;
bool x[N+1]={false};
ll fast(ll n,ll a)
{
    if(n==0)
        return 1;
    else if(n==1)
        return a;
    else
    {
        ll res=fast(n/2,a)%Mod;
        if(n%2==0)
        {
            return (((res%Mod)*(res%Mod))%Mod);
        }
        else{
            return (((((res%Mod)*a)%Mod)*res)%Mod);
        }
    }
}

int main()
{
  string s,r;
  cin>>s>>r
  int i,j=0;
  for(i=0;i<3;i++)
  {
      if(s[i]==r[i])
        j++;
  }
  cout<<j;



}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:12: error: expected ';' before 'int'
   32 |   cin>>s>>r
      |            ^
      |            ;
   33 |   int i,j=0;
      |   ~~~       
a.cc:34:7: error: 'i' was not declared in this scope
   34 |   for(i=0;i<3;i++)
      |       ^
a.cc:37:9: error: 'j' was not declared in this scope
   37 |         j++;
      |         ^
a.cc:39:9: error: 'j' was not declared in this scope
   39 |   cout<<j;
      |         ^
Language: C++

#include<stdio.h>

int main(){
    char s[4],t[4];
    int d=0;
    scanf("%s",s);
    scanf("%s",t);
    for(i=0;i<3;i++){
        if(s[i]==t[i]){
            d++;
        }
    }
    printf("%d",d);
}

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

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

Compiler output:
a.cc:2:5: error: cannot declare '::main' to be a global variable
    2 | int main(voio)
      |     ^~~~
a.cc:2:10: error: 'voio' was not declared in this scope; did you mean 'void'?
    2 | int main(voio)
      |          ^~~~
      |          void
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(void){
    string T, S, count = 0;
    cin >> S;
    cin >> T;
    for(int 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:11:31: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
   11 |         if(S[i] == T[i]) count++;
      |                          ~~~~~^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
#define ff first
#define ss second
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define boost ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define check(x) cout << #x << " : " << (x) << endl
#define all(v) v.begin(),v.end() 
#define endl '\n'  
typedef long long ll; 
typedef unsigned long long ull; 
typedef long double ld;
typedef pair< ll , ll > mypair;
typedef priority_queue <ll> max_heap;
typedef priority_queue <mypair, vector<mypair>, greater<mypair> > min_heap;
const ll mod=1e9+7;
const ll inf=1e16;
const ll N=1e5+10;

int main()
{
	boost;
	string a,b;
	cin>>a>>b;
	int ans=0;
	for(int i=0;i<n;i++) if(a[i]==b[i]) ans++;
	cout<<ans;	

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:23: error: 'n' was not declared in this scope
   28 |         for(int i=0;i<n;i++) if(a[i]==b[i]) ans++;
      |                       ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long l;
typdef long long ll;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    const l mod = 1000000007;
    l t;
   // cin>>t;
   t = 1;
    while(t--)
    {
        string s1,s2;
        cin>>s1>>s2;
        l a = 0;
        for(l i = 0 ; i<3 ; i++)
        if(s1[i]==s2[i])
        a++;
        cout<<a<<endl;
    }
    return 0;
}

Compiler output:
a.cc:4:1: error: 'typdef' does not name a type; did you mean 'typedef'?
    4 | typdef long long ll;
      | ^~~~~~
      | typedef
Language: Java


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        /**
        int n = sc.nextInt();
        int[]arr = new int[n];
        for(int i  = 0;i<n;i++)
        {
            arr[i] = sc.nextInt();
        }
         **/
        String s1 =sc.nextLine();
        String s2 =sc.nextLine();
        long res= 0;
        for(int i =  0;i< s2.length();i++)
        {
            if(s2.charAt(i) == s1.charAt(i))
                res++;
        }
        System.out.println(res);

    }
}
package AtCoder139;

import java.util.Scanner;

public class A {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        /**
        int n = sc.nextInt();
        int[]arr = new int[n];
        for(int i  = 0;i<n;i++)
        {
            arr[i] = sc.nextInt();
        }
         **/
        String s1 =sc.nextLine();
        String s2 =sc.nextLine();
        long res= 0;
        for(int i =  0;i< s2.length();i++)
        {
            if(s2.charAt(i) == s1.charAt(i))
                res++;
        }
        System.out.println(res);

    }
}


Compiler output:
Main.java:27: error: class, interface, enum, or record expected
package AtCoder139;
^
Main.java:29: error: class, interface, enum, or record expected
import java.util.Scanner;
^
2 errors
Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>

using namespace std;

char s1[N],s2[N],ans;

int main() {
    scanf("%s",s1+1);
    scanf("%s",s2+1);
    for(int i = 1 ; i <= 3 ; i++) {
        if(s1[i] == s2[i]) ans++;
    }
    cout<<ans;
    //system("pause");
    return 0;
}

Compiler output:
a.cc:8:9: error: 'N' was not declared in this scope
    8 | char s1[N],s2[N],ans;
      |         ^
a.cc:8:15: error: 'N' was not declared in this scope
    8 | char s1[N],s2[N],ans;
      |               ^
a.cc: In function 'int main()':
a.cc:11:16: error: 's1' was not declared in this scope
   11 |     scanf("%s",s1+1);
      |                ^~
a.cc:12:16: error: 's2' was not declared in this scope
   12 |     scanf("%s",s2+1);
      |                ^~
Language: C++

//
//  main.cpp
//  temp
//
//  Created by tolemy on 2019/08/04.
//  Copyright © 2019 tolemy. All rights reserved.
//

#include <iostream>

using namespace std;

int main(int argc, const char * argv[]) {
    
    string s;
    cin >> s;
    
    string t;
    cin >> t;
    
    int count = 0;
    for(int i=0;i<3;i++)
    {
        if(s[i] == t[i]) c++
    }
    
    cout << count << endl;
    
    return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:24:26: error: 'c' was not declared in this scope
   24 |         if(s[i] == t[i]) c++
      |                          ^
Language: C++

#include<bits/stdc++.h>
#define N 10

using namespace std;

int c[N], c2[N];

int main(){
	scanf("%s", c1);
	scanf("%s", c2);
	int c=0;
	for(int i=0;i<3;i++) if(c1[i]==c2[i]) c++;
	printf("%d\n", c);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: 'c1' was not declared in this scope; did you mean 'y1'?
    9 |         scanf("%s", c1);
      |                     ^~
      |                     y1
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: expected '}' at end of input
    9 |   cout<<cnt;
      |             ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++


#include<bits/stdc++.h>
//#include<ext/pb_ds/tree_policy.hpp>
#define ll long long
#define int long long int
#define mkp make_pair
#define maxN 1005
#define pb push_back
#define ff first
#define ss second
#define debug1(a) cout<<a<<endl;
#define debug2(a,b) cout<<a<<' '<<b<<endl;
#define debug3(a,b,c) cout<<a<' '<<b<<' '<<c<<endl;
#define rep(i,n) for(int i=0;i<n;i++)
#define repl(i,a,b) for(int i=a;i<b;i++)
#define pi pair<int,int>
#define pii pair<int,pi>
#define mp map<int,int>
#define ump unordered_map<int,int>
#define  vi vector<int>
#define st set<int>
#define mst multiset<int>
#define pq priority_queue
#define mpq priority_queue<int,vector<int>,greater<int> >
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define in cin>>
#define out cout<<
//using namespace __gnu_pbds;
using namespace std;
//typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> orderedSet;
//typedef tree<int,null_type,less_equal<int>,rb_tree_tag,tree_order_statistics_node_update> orderedMSet;
//*p.find_by_order(index) return value at index
//p.order_of_key(key) return index
void printArray(int arr[],int n)
{
   for(int i=0;i<n;i++)cout<<arr[i]<<' ';
}
void printMp(mp m)
{
  mp ::iterator it;
  for(it=m.begin();it!=m.end();it++)cout<<it->first<<' '<<it->second<<endl;
}
void printUmp(ump m)
{
  ump ::iterator it;
  for(it=m.begin();it!=m.end();it++)cout<<it->first<<' '<<it->second<<endl;
}
void printSt(st s)
{
  st ::iterator it;
  for(it=s.begin();it!=s.end();it++)cout<<*it<<' ';
}
void printMst(mst s)
{
  mst ::iterator it;
  for(it=s.begin();it!=s.end();it++)cout<<*it<<' ';
}
void printVec(vector<int>v)
{
for(int i=0;i<v.size();i++)cout<<v[i]<<' ';
}
void printVec2(vector<int>v[],int n)
{
    for(int i=0;i<n;i++)
    {
        for(int j=0;j<v[i].size();j++)
            cout<<v[i][j]<<' ';
        cout<<endl;
    }
}
 set<pair<int,int>> primeset;
void SieveOfEratosthenes(int n)
{
    bool prime[n+1];
    memset(prime, true, sizeof(prime));

    for (int p=2; p*p<=n; p++)
    {
        if (prime[p] == true)
        {
        for (int i=p*p; i<=n; i += p)
                prime[i] = false;
        }
    }
    for (int p=2; p<=n; p++)
       if (prime[p])
          primeset.insert(mkp(p,1));
}
pi g1[1000006],g2[1000006];
int arr[maxN][maxN];

int32_t main(){
    fastio;
    strin s1;in s1;
    string s2;in s2;
    int c=0;
    for(int i=0;i<3;i++){
        if(s1[i]==s2[i])
            c++;
    }
    out c<<endl;

}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:94:5: error: 'strin' was not declared in this scope; did you mean 'stdin'?
   94 |     strin s1;in s1;
      |     ^~~~~
      |     stdin
a.cc:94:17: error: 's1' was not declared in this scope; did you mean 'y1'?
   94 |     strin s1;in s1;
      |                 ^~
      |                 y1