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

#include <stdio.h>

int main(void) {
	iong int n;
	scanf("%d",&n);
	printf("%d",n*(n-1)/2);
	
	// your code goes here
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:9: error: 'iong' undeclared (first use in this function)
    4 |         iong int n;
      |         ^~~~
main.c:4:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:13: error: expected ';' before 'int'
    4 |         iong int n;
      |             ^~~~
      |             ;
main.c:5:21: error: 'n' undeclared (first use in this function)
    5 |         scanf("%d",&n);
      |                     ^
Language: C++

#include<bits/stdc++.h>
#define long long ll
using namespace std; 
int main(){
  ll n;
  cin>>n;
  n=n-1;
  if(n>0){
    cout<<(n*(n+1))/2;
  }
  else{
    cout<<0;
  }
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'll' was not declared in this scope
    5 |   ll n;
      |   ^~
a.cc:6:8: error: 'n' was not declared in this scope; did you mean 'yn'?
    6 |   cin>>n;
      |        ^
      |        yn
Language: C++

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   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 | using namespace std;
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   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 | using namespace std;
a.cc:5:10: error: 'S' was not declared in this scope
    5 |   cin >> S >> T;
      |          ^
a.cc:5:15: error: 'T' was not declared in this scope
    5 |   cin >> S >> T;
      |               ^
a.cc:13:5: error: 'cout' was not declared in this scope
   13 |     cout << count << endl;
      |     ^~~~
a.cc:13:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:22: error: 'endl' was not declared in this scope
   13 |     cout << count << endl;
      |                      ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: Java

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

public class A {
	public static void main(String srgs[]) {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		try {
			String s = reader.readLine();
			String t = reader.readLine();

			int count = 0;

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

			System.out.println(count);

		} catch (IOException e) {
			e.printStackTrace();
		}

	}

}


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

#include<bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
7 int ans = 0;
	if(s[0] == t[0]) ans++;
	if(s[1] == t[1]) ans++;
	if(s[2] == t[2]) ans++;
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:2: error: expected ';' before 'int'
    6 | 7 int ans = 0;
      |  ^~~~
      |  ;
a.cc:7:26: error: 'ans' was not declared in this scope; did you mean 'abs'?
    7 |         if(s[0] == t[0]) ans++;
      |                          ^~~
      |                          abs
a.cc:8:26: error: 'ans' was not declared in this scope; did you mean 'abs'?
    8 |         if(s[1] == t[1]) ans++;
      |                          ^~~
      |                          abs
a.cc:9:26: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |         if(s[2] == t[2]) ans++;
      |                          ^~~
      |                          abs
a.cc:10:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |         cout << ans << endl;
      |                 ^~~
      |                 abs
Language: C

s=list(input())
t=list(input())
cnt=0
for i in range(3):
    if(s[i]==t[i]):
        cnt+=1
print(cnt)

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

#include <iosetream>
#iclude <string>
using namespace std;
int main(){
 string a,b;
  int count = 0;
  cin>>a>>b;
  if(a[0] == b[0])count++;
    if(a[1] == b[1])count++;
    if(a[2] == b[2])count++;
  cout<<count<<endl;
  return 0;
}

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:8: error: expected ';' before '}' token
   14 | cout<<c
      |        ^
      |        ;
   15 | 
   16 | }
      | ~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: expected ';' before 'count'
    9 |   {  if(a[i]==b[i]
      |                   ^
      |                   ;
   10 |         count++;
      |         ~~~~~      
a.cc:12:3: error: expected primary-expression before '}' token
   12 |   }
      |   ^
a.cc:10:17: error: expected ')' before '}' token
   10 |         count++;
      |                 ^
      |                 )
   11 | 
   12 |   }
      |   ~              
a.cc:9:8: note: to match this '('
    9 |   {  if(a[i]==b[i]
      |        ^
a.cc:12:3: error: expected primary-expression before '}' token
   12 |   }
      |   ^
Language: C

#include <stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:12:10: error: expected expression before '%' token
   12 |   printf(%d,k);
      |          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int cnt =0;
  sring s,t;cin>>s>>t;
  if(s[0]==t[0])cnt++;
  if(s[1]==t[1])cnt++;
  if(s[2]==t[2])cnt++;
  cout<<cnt<<endl;
}


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

#include<bits/stdc++.h>
int main(){
  int cnt =0;
  sring s,t;cin>>s>>t;
  if(s[0]==t[0])cnt++;
  if(s[1]==t[1])cnt++;
  if(s[2]==t[2])cnt++;
  cout<<cnt<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'sring' was not declared in this scope
    4 |   sring s,t;cin>>s>>t;
      |   ^~~~~
a.cc:4:13: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   sring s,t;cin>>s>>t;
      |             ^~~
      |             std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:4:18: error: 's' was not declared in this scope
    4 |   sring s,t;cin>>s>>t;
      |                  ^
a.cc:4:21: error: 't' was not declared in this scope; did you mean 'tm'?
    4 |   sring s,t;cin>>s>>t;
      |                     ^
      |                     tm
a.cc:8:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   cout<<cnt<<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |   cout<<cnt<<endl;
      |              ^~~~
      |              std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
#include <stdio.h>
 
int main(){
	str s1;
  	str s2;
  	cin >> s1>>s2;
  	int cnt = 0;
  for(int i =0;i < 3; i++){
  	if(s1[i] == s2[i])cnt++;
  }
  cout << cnt<<"\n";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'str' was not declared in this scope; did you mean 'std'?
    5 |         str s1;
      |         ^~~
      |         std
a.cc:6:12: error: expected ';' before 's2'
    6 |         str s2;
      |            ^~~
      |            ;
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |         cin >> s1>>s2;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:16: error: 's1' was not declared in this scope
    7 |         cin >> s1>>s2;
      |                ^~
a.cc:7:20: error: 's2' was not declared in this scope
    7 |         cin >> s1>>s2;
      |                    ^~
a.cc:12:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |   cout << cnt<<"\n";
      |   ^~~~
      |   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 <iostream>
#include <stdio>

int main(){
	str s1;
  	str s2;
  	cin >> s1>>s2;
  	int cnt = 0;
  for(int i =0;i < 3; i++){
  	if(s1[i] == s2[i])cnt++;
  }
  cout << cnt<<"\n";
  return 0;
}

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

#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <queue>
#include <set>
#include <map>

#define MIN(a, b) ((a) < (b) ? (a) : (b))
#difime MAX(a, b) ((a) > (b) ? (a) : (b))
#define for_p(i, a, b) for(int i = a; i < b; i++)
#define for_m(i, a, b) for(int i = a - 1; i >= b; i--)

//a = s1.size();
//vector<string> s1;
//string s2 = accumulate( s1.begin(), s1.end(), string() );
using namespace std;

int main()
{
  int a = 0 , b = 0, c = 0, d = 0, e = 0, f = 0;
  int i = 0, j = 0;
  double d1 = 0, d2 = 0, d3 = 0, d4 = 0, d5 = 0, d6 = 0;
  int a1[256], a2[512], a3[1024];
  char s1[200000], s2[200000], s3[200000];
  
  cin >> s1 >> s2;
  
  if(s1[0] == s2[0]){
    c++;
  }
    if(s1[1] == s2[1]){
    c++;
  }  if(s1[2] == s2[2]){
    c++;
  }
  cout << c << endl;
}
  


Compiler output:
a.cc:15:2: error: invalid preprocessing directive #difime; did you mean #define?
   15 | #difime MAX(a, b) ((a) > (b) ? (a) : (b))
      |  ^~~~~~
      |  define
Language: C++

import std.stdio;
import std.string;

void main() {
  string s = chomp(readln());
  string t = chomp(readln());
  int ans = 0;

  for (int i=0; i<s.length; i++) {
    if (s[i] == t[i]) ans++;
  }

  writeln(ans);
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import std.stdio;
      | ^~~~~~
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 std.string;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: '::main' must return 'int'
    4 | void main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string s = chomp(readln());
      |   ^~~~~~
a.cc:6:9: error: expected ';' before 't'
    6 |   string t = chomp(readln());
      |         ^~
      |         ;
a.cc:9:19: error: 's' was not declared in this scope
    9 |   for (int i=0; i<s.length; i++) {
      |                   ^
a.cc:10:17: error: 't' was not declared in this scope
   10 |     if (s[i] == t[i]) ans++;
      |                 ^
a.cc:13:3: error: 'writeln' was not declared in this scope
   13 |   writeln(ans);
      |   ^~~~~~~
Language: C++

// #include <iostream>
// #include <string>
// #include <math.h>
// #include <map>
// #include <vector>
// #include <tuple>
// #include <algorithm>
// #include <queue>
#include<bits/stdc++.h>
using namespace std;
#define lli long long int
#define vi vector<int>
#define vlli vector<lli>
#define pii pair<int, int>
#define plli pair <lli, lli>
#define F(i,n) for(lli (i)=0;(i)<(n);(i)++)
#define FR(i,n) for(lli (i)=(n)-1;(i)>=0;(i)--)
#define FSG(i,a,b) for(lli (i)=(a);(i)<(b);(i)++)
#define FSGR(i,a,b) for(lli (i)=(b)-1;(i)>=(a);(i)--)
#define VAL(n) cout << n << endl;
#define VALD(n) cout << #n << ": " << n << endl;
void remove(std::vector<T>& vector, unsigned int index)
{
    vector.erase(vector.begin() + index);
}
int main(){
  string s, t;
  cin >> s;
  cin >> t;
  int cnt = 0;
  F(i, 3){
    if (s[i] == t[i]){
      cnt++;
    }
  }
  cout << cnt << endl;
  return 0;
}


Compiler output:
a.cc:22:25: error: 'T' was not declared in this scope
   22 | void remove(std::vector<T>& vector, unsigned int index)
      |                         ^
a.cc:22:26: error: template argument 1 is invalid
   22 | void remove(std::vector<T>& vector, unsigned int index)
      |                          ^
a.cc:22:26: error: template argument 2 is invalid
a.cc: In function 'void remove(int&, unsigned int)':
a.cc:24:12: error: request for member 'erase' in 'vector', which is of non-class type 'int'
   24 |     vector.erase(vector.begin() + index);
      |            ^~~~~
a.cc:24:25: error: request for member 'begin' in 'vector', which is of non-class type 'int'
   24 |     vector.erase(vector.begin() + index);
      |                         ^~~~~
Language: C++

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

typedef long long l;

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

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    1 | #inlcude<bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:7:3: error: 'string' was not declared in this scope
    7 |   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 | #inlcude<bits/stdc++.h>
a.cc:9:3: error: 'cin' was not declared in this scope
    9 |   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 | #inlcude<bits/stdc++.h>
a.cc:9:8: error: 's' was not declared in this scope
    9 |   cin>>s>>t;
      |        ^
a.cc:9:11: error: 't' was not declared in this scope
    9 |   cin>>s>>t;
      |           ^
a.cc:13:3: error: 'cout' was not declared in this scope
   13 |   cout<<count;
      |   ^~~~
a.cc:13:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

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

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


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

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

using namespace std;
char s1[3],s2[3];
int ans=0;
int main(){
    gets(s1);
    gets(s2);
	for(int 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:5: 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;
char s1[3],s2[3];
int ans=0;
int main(){
    gets(s1);
    gets(s2);
	for(int 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:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 |     gets(s1);
      |     ^~~~
      |     getw
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
        String exStr = sc.next();
        String plStr = sc.next();
		
        int count = 0;
        for(int i = 0; i < 3; i++){
          if((exStr.charAt(i)).equals(plStr.charAt(i))){
            count++;
          }
        }
      
		// 出力
		System.out.println(count);
	}
}

Compiler output:
Main.java:11: error: char cannot be dereferenced
          if((exStr.charAt(i)).equals(plStr.charAt(i))){
                              ^
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
        String exStr = sc.next();
        String plStr = sc.next();
		
        int count = 0;
        for(int i = 0; i < 3; i++){
          if(exStr.charAt(i).equals(plStr.charAt(i))){
            count++;
          }
        }
      
		// 出力
		System.out.println(count);
	}
}

Compiler output:
Main.java:11: error: char cannot be dereferenced
          if(exStr.charAt(i).equals(plStr.charAt(i))){
                            ^
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
        String[] exTenki = {sc.next(), sc.next(), sc.next()};
        String[] plTenki = {sc.next(), sc.next(), sc.next()};
		
        int count = 0;
        for(int i = 0; i < 3; i++){
          if(exTenki[i].equals(plTenki[i]){
            count++;
          }
        }
      
		// 出力
		System.out.println(count);
	}
}

Compiler output:
Main.java:11: error: ')' expected
          if(exTenki[i].equals(plTenki[i]){
                                          ^
1 error
Language: C++

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

int main()
{

    char S[5];
    char T[5];
    int c=0;

    gets(S);
    gets(T);


    for(int 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:14:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   14 |     gets(S);
      |     ^~~~
      |     getw
Language: C++

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

void main(void){
      string s, t;
      cin>>s>>t;
      int ans=0;
      for(int i = 0;i<3;++i){if(s[i]==t[i])ans++;}

    cout<<ans;

}


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

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

void main(void){
      string s, t;
      cin>>s>>t;
      int ans=0;
      for(int i = 0;i<3;++i){if(s[i]==t[i])ans++;}

    cout<<ans;

}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc:5:1: error: '::main' must return 'int'
    5 | void main(void){
      | ^~~~
a.cc: In function 'int main()':
a.cc:6:7: error: 'string' was not declared in this scope
    6 |       string s, t;
      |       ^~~~~~
a.cc:7:7: error: 'cin' was not declared in this scope
    7 |       cin>>s>>t;
      |       ^~~
a.cc:7:12: error: 's' was not declared in this scope
    7 |       cin>>s>>t;
      |            ^
a.cc:7:15: error: 't' was not declared in this scope
    7 |       cin>>s>>t;
      |               ^
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout<<ans;
      |     ^~~~
Language: C++

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

void main(void){
      string s, t;
      cin>>s>>t;
      int ans=0;
      for(int i = 0;i<3;++i){if(s[i]==t[i])ans++;}}

    cout<<ans;




Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc:5:1: error: '::main' must return 'int'
    5 | void main(void){
      | ^~~~
a.cc: In function 'int main()':
a.cc:6:7: error: 'string' was not declared in this scope
    6 |       string s, t;
      |       ^~~~~~
a.cc:7:7: error: 'cin' was not declared in this scope
    7 |       cin>>s>>t;
      |       ^~~
a.cc:7:12: error: 's' was not declared in this scope
    7 |       cin>>s>>t;
      |            ^
a.cc:7:15: error: 't' was not declared in this scope
    7 |       cin>>s>>t;
      |               ^
a.cc: At global scope:
a.cc:11:5: error: 'cout' does not name a type
   11 |     cout<<ans;
      |     ^~~~
Language: C++

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

int main(){
string a,b;
  cin>>a>>b;
  int c=0;
  for(int i=0;i<3;i++)
    if(a[i]==b[i])c++;
  cout<<c<<'\n';
}

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

#include <iostream>
#include <string>
 
using namespace std;
 
int main(){
 
string a;
string b;
cin >> a;
cin >> b;
 
int count = 0;
int i;
for(i=0;i<a.size();i++){
  if(a == b){
  	count++;
  }
}
 
cout << count;
}
#include <iostream>
#include <string>
 
using namespace std;

int(main){
 
string a;
string b;
cin >> a;
cin >> b;
 
int count = 0;
int i;
for(i=0;i<a.size();i++){
  if(a == b){
  	count++;
  }
}
 
cout << count;
}


Compiler output:
a.cc:28:5: error: cannot declare '::main' to be a global variable
   28 | int(main){
      |     ^~~~
a.cc:28:9: error: 'int main' redeclared as different kind of entity
   28 | int(main){
      |         ^
a.cc:6:5: note: previous declaration 'int main()'
    6 | int main(){
      |     ^~~~
a.cc:30:8: error: expected primary-expression before 'a'
   30 | string a;
      |        ^
a.cc:30:8: error: expected '}' before 'a'
a.cc:28:10: note: to match this '{'
   28 | int(main){
      |          ^
a.cc:32:1: error: 'cin' does not name a type
   32 | cin >> a;
      | ^~~
a.cc:33:1: error: 'cin' does not name a type
   33 | cin >> b;
      | ^~~
a.cc:37:1: error: expected unqualified-id before 'for'
   37 | for(i=0;i<a.size();i++){
      | ^~~
a.cc:37:9: error: 'i' does not name a type
   37 | for(i=0;i<a.size();i++){
      |         ^
a.cc:37:20: error: 'i' does not name a type
   37 | for(i=0;i<a.size();i++){
      |                    ^
a.cc:43:1: error: 'cout' does not name a type
   43 | cout << count;
      | ^~~~
a.cc:44:1: error: expected declaration before '}' token
   44 | }
      | ^
Language: C++

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

int(main){
 
string a;
string b;
cin >> a;
cin >> b;
 
int count = 0;
int i;
for(i=0;i<a.size();i++){
  if(a == b){
  	count++;
  }
}
 
cout << count;
}

Compiler output:
a.cc:6:5: error: cannot declare '::main' to be a global variable
    6 | int(main){
      |     ^~~~
a.cc:8:8: error: expected primary-expression before 'a'
    8 | string a;
      |        ^
a.cc:8:8: error: expected '}' before 'a'
a.cc:6:10: note: to match this '{'
    6 | int(main){
      |          ^
a.cc:10:1: error: 'cin' does not name a type
   10 | cin >> a;
      | ^~~
a.cc:11:1: error: 'cin' does not name a type
   11 | cin >> b;
      | ^~~
a.cc:15:1: error: expected unqualified-id before 'for'
   15 | for(i=0;i<a.size();i++){
      | ^~~
a.cc:15:9: error: 'i' does not name a type
   15 | for(i=0;i<a.size();i++){
      |         ^
a.cc:15:20: error: 'i' does not name a type
   15 | for(i=0;i<a.size();i++){
      |                    ^
a.cc:21:1: error: 'cout' does not name a type
   21 | cout << count;
      | ^~~~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: Java

import import java.util.Scanner;

class Main(){
java.util.Scanner;

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

Compiler output:
Main.java:1: error: <identifier> expected
import import java.util.Scanner;
      ^
Main.java:3: error: '{' expected
class Main(){
          ^
Main.java:4: error: <identifier> expected
java.util.Scanner;
                 ^
Main.java:6: error: '{' expected
class Main(){
          ^
Main.java:7: error: <identifier> expected
  public static main void(String[] args){
                    ^
Main.java:7: error: <identifier> expected
  public static main void(String[] args){
                         ^
Main.java:19: error: reached end of file while parsing
  }
   ^
7 errors
Language: C++

#include <iostream>
#include <string>
 
using namespace std;
 
string a;
string b;
cin >> a;
cin >> b;
 
int count = 0;
int i;
for(i=0;i<a.size();i++){
  if(a == b){
  	count++;
  }
}
 
cout << count;

Compiler output:
a.cc:8:1: error: 'cin' does not name a type
    8 | cin >> a;
      | ^~~
a.cc:9:1: error: 'cin' does not name a type
    9 | cin >> b;
      | ^~~
a.cc:13:1: error: expected unqualified-id before 'for'
   13 | for(i=0;i<a.size();i++){
      | ^~~
a.cc:13:9: error: 'i' does not name a type
   13 | for(i=0;i<a.size();i++){
      |         ^
a.cc:13:20: error: 'i' does not name a type
   13 | for(i=0;i<a.size();i++){
      |                    ^
a.cc:19:1: error: 'cout' does not name a type
   19 | cout << count;
      | ^~~~
Language: C++

#include <iostream>
#include <string>
 
using namespace std;
 
string a;
string b;
cin >> a;
cin >> b;
 
int count = 0;
 
for(int i=0;i<a.size();i++){
  if(a == b){
  	count++;
  }
}
 
cout << count;

Compiler output:
a.cc:8:1: error: 'cin' does not name a type
    8 | cin >> a;
      | ^~~
a.cc:9:1: error: 'cin' does not name a type
    9 | cin >> b;
      | ^~~
a.cc:13:1: error: expected unqualified-id before 'for'
   13 | for(int i=0;i<a.size();i++){
      | ^~~
a.cc:13:13: error: 'i' does not name a type
   13 | for(int i=0;i<a.size();i++){
      |             ^
a.cc:13:24: error: 'i' does not name a type
   13 | for(int i=0;i<a.size();i++){
      |                        ^
a.cc:19:1: error: 'cout' does not name a type
   19 | cout << count;
      | ^~~~
Language: C++

#include <iostream>
#include <string>

using namespace std;
 
string a;
string b;
cin >> a;
cin >> b;
 
int count = 0;
 
for(int i=0;i<a.size()){
  if(a == b){
  	count++;
  }
}

cout << count;



Compiler output:
a.cc:8:1: error: 'cin' does not name a type
    8 | cin >> a;
      | ^~~
a.cc:9:1: error: 'cin' does not name a type
    9 | cin >> b;
      | ^~~
a.cc:13:1: error: expected unqualified-id before 'for'
   13 | for(int i=0;i<a.size()){
      | ^~~
a.cc:13:13: error: 'i' does not name a type
   13 | for(int i=0;i<a.size()){
      |             ^
a.cc:19:1: error: 'cout' does not name a type
   19 | cout << count;
      | ^~~~
Language: C++

#include <iostream>
#include <string>

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

Compiler output:
a.cc:4:1: error: 'string' does not name a type; did you mean 'stdin'?
    4 | string a;
      | ^~~~~~
      | stdin
a.cc:5:1: error: 'string' does not name a type; did you mean 'stdin'?
    5 | string b;
      | ^~~~~~
      | stdin
a.cc:6:1: error: 'cin' does not name a type
    6 | cin >> a;
      | ^~~
a.cc:7:1: error: 'cin' does not name a type
    7 | cin >> b;
      | ^~~
a.cc:11:1: error: expected unqualified-id before 'for'
   11 | for(int i=0;i<a.size()){
      | ^~~
a.cc:11:13: error: 'i' does not name a type
   11 | for(int i=0;i<a.size()){
      |             ^
a.cc:17:1: error: 'cout' does not name a type
   17 | cout << count;
      | ^~~~
Language: C++

string a;
string b;
cin >> a;
cin >> b;

int count = 0;

for(int i=0;i<a.size()){
  if(a == b){
  	count++;
  }
}

cout << count;

Compiler output:
a.cc:1:1: error: 'string' does not name a type
    1 | string a;
      | ^~~~~~
a.cc:2:1: error: 'string' does not name a type
    2 | string b;
      | ^~~~~~
a.cc:3:1: error: 'cin' does not name a type
    3 | cin >> a;
      | ^~~
a.cc:4:1: error: 'cin' does not name a type
    4 | cin >> b;
      | ^~~
a.cc:8:1: error: expected unqualified-id before 'for'
    8 | for(int i=0;i<a.size()){
      | ^~~
a.cc:8:13: error: 'i' does not name a type
    8 | for(int i=0;i<a.size()){
      |             ^
a.cc:14:1: error: 'cout' does not name a type
   14 | cout << count;
      | ^~~~
Language: C++

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

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

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

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

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

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

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string.h>
#include <string>
#include <cmath>

using namespace std;

int main()
{
    int flag = 0;
    char s[5], t[5], str[2];
    scanf("%s", s);
    gets(str);
    scanf("%s", t);
    for(int i = 0; i < 3; i ++ ){
        if(s[i] == t[i]) flag ++ ;
    }
    printf("%d", flag);
    return 0;
}


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

#include <stdio.h>
#include <stdlib.h>
 
int main (void) {
  char str1, str2;
  int resoult = 0;
  
  scanf("%s", str1);
  scanf("%s", str2);
  
  for (int i = 0; i < 3; i++) {
    if( str1[i] == str2[i] ) {
      resoult++;
    }
  }
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:13: error: subscripted value is neither array nor pointer nor vector
   12 |     if( str1[i] == str2[i] ) {
      |             ^
main.c:12:24: error: subscripted value is neither array nor pointer nor vector
   12 |     if( str1[i] == str2[i] ) {
      |                        ^
Language: C

#include <stdio.h>
#include <stdlib.h>
 
int main (void) {
  char str1, str2;
  int resoult = 0;
  
  scanf("%s", str1);
  scanf("%s", str2);
  
  for int i = 0; i< 3; i++ {
    if( str1[i] == str2[i] ) {
      resoult++;
    }
  }
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:7: error: expected '(' before 'int'
   11 |   for int i = 0; i< 3; i++ {
      |       ^~~
      |       (
main.c:11:18: error: 'i' undeclared (first use in this function)
   11 |   for int i = 0; i< 3; i++ {
      |                  ^
main.c:11:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:27: error: expected ';' before '{' token
   11 |   for int i = 0; i< 3; i++ {
      |                           ^~
      |                           ;
Language: C

#include <stdio.h>
#include <stdlib.h>

int main (void) {
  char str1[3], str2[3];
  int resoult = 0;
  
  scanf("%s", str1);
  scanf("%s", str2);
  
  for int i = 0; i< 3; i++ {
    if( str1[i] == str2[i] ) {
      resoult++;
    }
  }
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:7: error: expected '(' before 'int'
   11 |   for int i = 0; i< 3; i++ {
      |       ^~~
      |       (
main.c:11:18: error: 'i' undeclared (first use in this function)
   11 |   for int i = 0; i< 3; i++ {
      |                  ^
main.c:11:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:27: error: expected ';' before '{' token
   11 |   for int i = 0; i< 3; i++ {
      |                           ^~
      |                           ;
Language: C++

#include <iostream>
#include <math.h>

using namespace std;
int main{
    int i,count;
    string S,T;
   
    cin >> S;
    cin >> T;

    for(i=0;i<3;i++){
        if(S[i] == T[i]){
            count++;
        }
    }

    cout << count << endl;

}


Compiler output:
a.cc:5:5: error: cannot declare '::main' to be a global variable
    5 | int main{
      |     ^~~~
a.cc:6:5: error: expected primary-expression before 'int'
    6 |     int i,count;
      |     ^~~
a.cc:6:5: error: expected '}' before 'int'
a.cc:5:9: note: to match this '{'
    5 | int main{
      |         ^
a.cc:9:5: error: 'cin' does not name a type
    9 |     cin >> S;
      |     ^~~
a.cc:10:5: error: 'cin' does not name a type
   10 |     cin >> T;
      |     ^~~
a.cc:12:5: error: expected unqualified-id before 'for'
   12 |     for(i=0;i<3;i++){
      |     ^~~
a.cc:12:13: error: 'i' does not name a type
   12 |     for(i=0;i<3;i++){
      |             ^
a.cc:12:17: error: 'i' does not name a type
   12 |     for(i=0;i<3;i++){
      |                 ^
a.cc:18:5: error: 'cout' does not name a type
   18 |     cout << count << endl;
      |     ^~~~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: Java

import java.util.Scanner;

public class A_Tenki {
	@SuppressWarnings("resource")
	public static void Main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		// 天気予報の取得
		String yohou = sc.next();
		//天気の結果取得
		String result = sc.next();
		sc.close();
		int count = 0;

		//カウントする。
		for(int i = 0; i < 3; i++) {
			if(yohou.substring(i, i+1) == result.substring(i, i+1)) {
				count++;
			}
		}
		// 出力
		System.out.println(count);
	}

}

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

import java.util.Scanner;

public class ABC139_Tenki {
    public static void main(String[] args) {
        char S[],T[];
        Scanner input=new Scanner(System.in);
        S=input.next().toCharArray();
        T=input.next().toCharArray();
        int count=0;
        for(int i=0;i<3;i++)
        {
            if(S[i]==T[i])
            {
                
                count++;
            }
        }
        System.out.println(count);
    }
}

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

#include<iostream>
#include<string>
using namespace std;
int a;
int main(){
  string s,t;
  cin>>s>>t;
  if(s[0]==t[0]){
    a++;
  }
  if(s[1]==t[1]){
    a++;
  }
  if(a[2]==t[2]){
    a++;
  }
  cout<<a<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:7: error: invalid types 'int[int]' for array subscript
   14 |   if(a[2]==t[2]){
      |       ^
Language: C++

#include<iostream>
#include<string>
using namespace atd;
int a;
int main(){
  string s,t;
  cin>>s>>t;
  if(s[0]==t[0]){
    a++;
  }
  if(s[1]==t[1]){
    a++;
  }
  if(a[2]==t[2]){
    a++;
  }
  cout<<a<<endl;
}

Compiler output:
a.cc:3:17: error: 'atd' is not a namespace-name
    3 | using namespace atd;
      |                 ^~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string s,t;
      |   ^~~~~~
a.cc:6: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:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin>>s>>t;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:8: error: 's' was not declared in this scope
    7 |   cin>>s>>t;
      |        ^
a.cc:7:11: error: 't' was not declared in this scope; did you mean 'tm'?
    7 |   cin>>s>>t;
      |           ^
      |           tm
a.cc:14:7: error: invalid types 'int[int]' for array subscript
   14 |   if(a[2]==t[2]){
      |       ^
a.cc:17:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |   cout<<a<<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:17:12: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |   cout<<a<<endl;
      |            ^~~~
      |            std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
#include<string>
using nameapace atd;
int a;
int main(){
  string s,t;
  cin>>s>>t;
  if(s[0]==t[0]){
    a++;
  }
  if(s[1]==t[1]){
    a++;
  }
  if(a[2]==t[2]){
    a++;
  }
  cout<<a<<endl;
}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'nameapace'
    3 | using nameapace atd;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string s,t;
      |   ^~~~~~
a.cc:6: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:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin>>s>>t;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:8: error: 's' was not declared in this scope
    7 |   cin>>s>>t;
      |        ^
a.cc:7:11: error: 't' was not declared in this scope; did you mean 'tm'?
    7 |   cin>>s>>t;
      |           ^
      |           tm
a.cc:14:7: error: invalid types 'int[int]' for array subscript
   14 |   if(a[2]==t[2]){
      |       ^
a.cc:17:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |   cout<<a<<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:17:12: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |   cout<<a<<endl;
      |            ^~~~
      |            std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

def count_same(f, r):
    count = 0
    for i in range(len(f)):
        if f[i].upper() == r[i].upper():
            count += 1
    print(count)
forecast = input()
real = input()
if (len(forecast) == len(real)):
    count_same(forecast, real)


Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def count_same(f, r):
      | ^~~
Language: C++

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

Compiler output:
a.cc:3:24: error: missing terminating > character
    3 | #include <bits/stdc++.h
      |                        ^
Language: C++

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

Compiler output:
a.cc:3:24: error: missing terminating > character
    3 | #include <bits/stdc++.h
      |                        ^
a.cc: In function 'int main()':
a.cc:15:7: error: 'c' was not declared in this scope
   15 |       c++;
      |       ^
a.cc:17:7: error: 'c' was not declared in this scope
   17 |       c=0;
      |       ^
a.cc:19:9: error: 'c' was not declared in this scope
   19 |   cout<<c;
      |         ^
Language: C++

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

Compiler output:
a.cc:3:24: error: missing terminating > character
    3 | #include <bits/stdc++.h
      |                        ^
a.cc: In function 'int main()':
a.cc:16:9: error: 'c' was not declared in this scope
   16 |   cout<<c;
      |         ^
Language: C++

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

Compiler output:
a.cc:3:24: error: missing terminating > character
    3 | #include <bits/stdc++.h
      |                        ^
a.cc: In function 'int main()':
a.cc:16:9: error: 'c' was not declared in this scope
   16 |   cout<<c;
      |         ^
a.cc:17:12: error: expected '}' at end of input
   17 |   return 0;
      |            ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
Language: C++

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

Compiler output:
a.cc:3:24: error: missing terminating > character
    3 | #include <bits/stdc++.h
      |                        ^
a.cc: In function 'int main()':
a.cc:16:9: error: 'c' was not declared in this scope
   16 |   cout<<c
      |         ^
a.cc:16:10: error: expected '}' at end of input
   16 |   cout<<c
      |          ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
Language: C++

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

Compiler output:
a.cc:2:24: error: missing terminating > character
    2 | #include <bits/stdc++.h
      |                        ^
a.cc: In function 'int main()':
a.cc:15:9: error: 'c' was not declared in this scope
   15 |   cout<<c
      |         ^
a.cc:15:10: error: expected '}' at end of input
   15 |   cout<<c
      |          ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

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

Compiler output:
a.cc:2:24: error: missing terminating > character
    2 | #include <bits/stdc++.h
      |                        ^
a.cc: In function 'int main()':
a.cc:15:9: error: 'c' was not declared in this scope
   15 |   cout<<c
      |         ^
a.cc:15:10: error: expected '}' at end of input
   15 |   cout<<c
      |          ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: Java

import java.util.Scanner;

public class Problem139a {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		System.out.println(tenki(scanner.nextLine(), scanner.nextLine()));
		scanner.close();
	}
	
	public static int tenki(String forecast, String weather) {
		int result = 0;
		for(int i = 0; i < 3; i++) {
			if(forecast.charAt(i) == weather.charAt(i)) {
				result++;
			}
		}
		return result;
	}
}

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

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 < 3 ; i++){
     if(s.charAt(i)==t.charAt(i)){
       ans++;
     }
   }
   System.out.print(ans);
  }
}


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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'cut' was not declared in this scope
   14 |         cut<<x<<endl;
      |         ^~~