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

#include <stdio.h>
#include <string.h>
int main(){
  int i,j,n,k;
  char s[1000][21],tmp[21];
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%s",s[i]);
  }
  for(i=0;i<n-1;i++){
    for(j=n-1;j>i;j--){
      k=strcmp(s[j]);
      if(k < 0){
	strcpy(tmp,s[j]);
	strcpy(s[j],s[j-1]);
	strcpy(s[j-1],tmp);
      }
    }
  }
  printf("%s\n",s[0]);
  return (0);
}

Compiler output:
main.c: In function 'main':
main.c:12:9: error: too few arguments to function 'strcmp'
   12 |       k=strcmp(s[j]);
      |         ^~~~~~
In file included from main.c:2:
/usr/include/string.h:156:12: note: declared here
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |            ^~~~~~
Language: C

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

int main( void ) {
	
	int n, i, j;
	char target[100][21], temp[21];
	
	scanf( "%d", &n );
	
	for ( i = 0; i < n; i++ ) {
		
		scanf( "%s", target[i] );
		
	}
	
	for ( i = 0; i < n; i++ ) {
		
		for ( j = 0; j < n - 1; j++ ) {
			
			if ( strcmp( target[j], target[j+1] ) > 0 ) {
				
				strcpy( temp, target[j] );
				strcpy( target[j], target[j+1] );
				strcpy( target[j+1], temp );
				
			}
			
		}
		
	}
	
	printf( "%s\n", target[0] );
	
	return 0;
	
}#include <stdio.h>
#include <string.h>

int main( void ) {
	
	int n, i, j;
	char target[100][21], temp[21];
	
	scanf( "%d", &n );
	
	for ( i = 0; i < n; i++ ) {
		
		scanf( "%s", target[i] );
		
	}
	
	for ( i = 0; i < n; i++ ) {
		
		for ( j = 0; j < n - 1; j++ ) {
			
			if ( strcmp( target[j], target[j+1] ) > 0 ) {
				
				strcpy( temp, target[j] );
				strcpy( target[j], target[j+1] );
				strcpy( target[j+1], temp );
				
			}
			
		}
		
	}
	
	printf( "%s\n", target[0] );
	
	return 0;
	
}

Compiler output:
main.c:37:2: error: stray '#' in program
   37 | }#include <stdio.h>
      |  ^
main.c:37:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   37 | }#include <stdio.h>
      |           ^
Language: C

#include <stdio.h>
#include <string.h>
#define cp 0
#define LENGTH 21
#define a 97
#define z 122
#define zero 48

void func_ini(char *w);

main()
{
	int n = 0;
	int i = 0, j = 0, k = 0;
	
	scanf("%d", &n);
	
	char word[n][LENGTH];
	char temp[LENGTH];
	
	for(i = 0; i < n; i++)
	{
		for(j = 0; j < LENGTH - 1; j++)
		{
			func_ini(&word[i][j]);
			func_ini(&temp[i]);
			#if cp == 2
			printf("c = %c ", word[i][j]);
			printf("d = %d\n ", word[i][j]);
			#endif
		}
		#if cp == 2
		printf("\n");
		#endif
	}
	#if cp == 2
	printf("初期化完了\n");
	#endif
	
	for(i = 0; i < n; i++) //単語を取得
	{
		scanf("%s", word[i]);
		#if cp == 2
		for(j = 0; j < LENGTH; j++)
		{
			if(word[i][j] == '\0')
			{
				break;
			}
			printf("word[%d][%d] = %d\n", i, j, word[i][j]);
		}
		#endif
	}
	strcpy(temp, word[0]);
	#if cp == 1
	printf("temp = %s\n", temp);
	#endif
	
	
	for(i = 0; i < n; i++)
	{
		printf("i = %d\n", i);
		//if(temp[0] > word[i][0])
		{
			strcpy(temp, word[i]);
			#if cp == 1
			printf("temp = %s\n", temp);
			#endif
		}
		else if(temp[0] == word[i][0])
		{
			for(j = 0; j < LENGTH; j++)
			{
				if(temp[j] > word[i][j])
				{
					strcpy(temp, word[i]);
					#if cp == 1
					printf("temp = %s\n", temp);
					#endif
				}
				else if((temp[j] == '\0') && (word[j] != '\0'))
				{
					break;
				}
				else if((temp[j] == '\0') && (word[j] == '\0'))
				{
					break;
				}
			}
		}
	}
	
	#if cp == 1
	printf("result = ");
	#endif
	printf("%s\n", temp); //出力表示
	return 0;
}

void func_ini(char *w) //配列初期化関数
{
	*w = '0';
}

Compiler output:
main.c:11:1: error: return type defaults to 'int' [-Wimplicit-int]
   11 | main()
      | ^~~~
main.c: In function 'main':
main.c:70:17: error: 'else' without a previous 'if'
   70 |                 else if(temp[0] == word[i][0])
      |                 ^~~~
main.c:81:71: warning: comparison between pointer and zero character constant [-Wpointer-compare]
   81 |                                 else if((temp[j] == '\0') && (word[j] != '\0'))
      |                                                                       ^~
main.c:81:63: note: did you mean to dereference the pointer?
   81 |                                 else if((temp[j] == '\0') && (word[j] != '\0'))
      |                                                               ^
main.c:85:71: warning: comparison between pointer and zero character constant [-Wpointer-compare]
   85 |                                 else if((temp[j] == '\0') && (word[j] == '\0'))
      |                                                                       ^~
main.c:85:63: note: did you mean to dereference the pointer?
   85 |                                 else if((temp[j] == '\0') && (word[j] == '\0'))
      |                                                               ^
Language: C++

#include <iostream>
#include <cstdio>
#include <vector>
using namespace std;

int main(void) {
    int num; cin >> num;
    
    vector<string> vec;
    for(int r = 0; r < num; r++) {
        string temp; cin >> temp;
        vec.push_back(temp);
    }
    sort(vec.begin(), vec.end());
    cout << vec[0] << endl;
    
    return(0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   14 |     sort(vec.begin(), vec.end());
      |     ^~~~
      |     short
Language: C++

#include<cstdio>
#include<cctype>
#include<string>
using namespace std;

int main(){
int n;
char minstr[20];
char str[20];
scanf("%d",&n);
for(int i=0;i<n;i++){
	scanf("%s",str);
	if(i==0)strcpy(minstr,str);
	if((strcmp(str,minstr)<0))strcpy(minstr,str);
}
printf("%s\n",minstr);

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: 'strcpy' was not declared in this scope
   13 |         if(i==0)strcpy(minstr,str);
      |                 ^~~~~~
a.cc:4:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<string>
  +++ |+#include <cstring>
    4 | using namespace std;
a.cc:14:13: error: 'strcmp' was not declared in this scope
   14 |         if((strcmp(str,minstr)<0))strcpy(minstr,str);
      |             ^~~~~~
a.cc:14:13: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:14:35: error: 'strcpy' was not declared in this scope
   14 |         if((strcmp(str,minstr)<0))strcpy(minstr,str);
      |                                   ^~~~~~
a.cc:14:35: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include<iostream>
#include<stdio.h>
#include<math.h>
#include<vector>
#include<string>
#include<vector>



#define INF 999999
using namespace std;

int main()
{
	int n;
	string in;
	int cmp;
	char str1[30];
	char str2[30];
	vector<string> book;
	cin >> n;
	for (int i = 0; i < n;  i++)
	{
		cin >> in;
		book.push_back(in);
	}
	
	for (int i = 1; i < n; i++)
	{
		strncpy(str1, book[0].c_str(),30);
		strncpy(str2, book[i].c_str(), 30);
		cmp = strcmp(str1, str2);
		if (cmp<0)
		{
			book[0] = str2;
		}
	}
	cout << book[0] << endl;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:17: error: 'strncpy' was not declared in this scope
   30 |                 strncpy(str1, book[0].c_str(),30);
      |                 ^~~~~~~
a.cc:5:1: note: 'strncpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include<vector>
  +++ |+#include <cstring>
    5 | #include<string>
a.cc:32:23: error: 'strcmp' was not declared in this scope
   32 |                 cmp = strcmp(str1, str2);
      |                       ^~~~~~
a.cc:32:23: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include<iostream>
#include<stdio.h>
#include<math.h>
#include<vector>
#include<string>
#include<vector>
#include <string.h>


#define INF 999999
using namespace std;

int main()
{
	int n;
	string in;
	int cmp;
	char str1[30];
	char str2[30];
	vector<string> book;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> in;
		book.push_back(in);
	}

	for (int i = 1; i < n; i++)
	{
		strncpy_s(str1, book[0].c_str(), 30);
		strncpy_s(str2, book[i].c_str(), 30);
		cmp = strcmp(str1, str2);
		if (cmp<0)
		{
			book[0] = str2;
		}
	}
	cout << book[0] << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:17: error: 'strncpy_s' was not declared in this scope; did you mean 'strncpy'?
   30 |                 strncpy_s(str1, book[0].c_str(), 30);
      |                 ^~~~~~~~~
      |                 strncpy
Language: C++

#include<iostream>
#include<stdio.h>
#include<math.h>
#include<vector>
#include<string>
#include<vector>
#include <string.h>


#define INF 999999
using namespace std;

int main()
{
	int n;
	string in;
	int cmp;
	char str1[30];
	char str2[30];
	vector<string> book;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> in;
		book.push_back(in);
	}

	for (int i = 1; i < n; i++)
	{
		strncpy_s(str1, book[0].c_str(), 30);
		strncpy_s(str2, book[i].c_str(), 30);
		cmp = strcmp(str1, str2);
		if (cmp>0)
		{
			book[0] = str2;
		}
	}
	cout << book[0] << endl;
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:17: error: 'strncpy_s' was not declared in this scope; did you mean 'strncpy'?
   30 |                 strncpy_s(str1, book[0].c_str(), 30);
      |                 ^~~~~~~~~
      |                 strncpy
Language: C++

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

int main(){
    int N;
    cin >> N;
    string str,ans;
    
    for(int i=0;i<N;i++){
	cin >> str;
	if(i==0) ans = str;
	else if(str < ans) ans = str;
    }
    cout << ans　<< endl;
    return 0;
}

Compiler output:
a.cc:16:13: error: extended character 　 is not valid in an identifier
   16 |     cout << ans　<< endl;
      |             ^
a.cc: In function 'int main()':
a.cc:16:13: error: 'ans\U00003000' was not declared in this scope
   16 |     cout << ans　<< endl;
      |             ^~~~~
Language: C++

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

int N;
string A[2000];
string top;

int main() {
	cin >> N;
	for(int i=0 ; i<N; ++i) {
		cin >> A[i];
		if(A[i]<top) top = A[i];
		}
	}
	cout << top << endl;
}

Compiler output:
a.cc:17:9: error: 'cout' does not name a type
   17 |         cout << top << endl;
      |         ^~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

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

int N;
string A[2000];
string top;

int main() {
	cin >> N;
	for(int i=0 ; i<N; ++i) {
		cin >> A[i];
		int k=0;
		while(A[i][k]!='\0' && A[i][k] <= top[k]) {
			if(A[i][k] < top[k]) {
				top = A[i];
				break;
			}
			++k;
		}
	cout << top << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:2: error: expected '}' at end of input
   23 | }
      |  ^
a.cc:10:12: note: to match this '{'
   10 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <queue>
#include <string>

using namespace std;

int main() {
	int n;
	string str;
	cin >> n;
	priority_queue<string, vector<string>, greater<string> > q;

	/* size で長さをとり、最後に行ったら表示するようにしてもよい */

	for (int i = 0; i < n; i++) {
		cin >> str;
		q.push(str);
	}

	cout << q.words.top() << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:19: error: 'class std::priority_queue<std::__cxx11::basic_string<char>, std::vector<std::__cxx11::basic_string<char> >, std::greater<std::__cxx11::basic_string<char> > >' has no member named 'words'
   20 |         cout << q.words.top() << endl;
      |                   ^~~~~
Language: C++

#include <algorithm>
#include <string>
#include <iostream>
using namespace std;
string A[1000];
int N;
int main(){
  cin >> N;
  if(N > 1000) abort();
  for(int i=0; i<N; ++i) cin >> A[i];
  sort (A,A+N)
  cout << A[0] <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: expected ';' before 'cout'
   11 |   sort (A,A+N)
      |               ^
      |               ;
   12 |   cout << A[0] <<endl;
      |   ~~~~
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main(){
	int a,b,n,cnt=0,primeCnt=0;
	vector<int> primeList;
	while(cin >> a >> b >> n,a && b && n){
		for(int i = 0; primeCnt <= 210; i++){
			for(int j = 1; j <= a+b*i; j++){
				if((a+b*i)%j == 0) cnt++;
			}
			if(cnt == 2){
				primeList.push_back(a+b*i);
				cnt = 0;
			}
			primeCnt++;
		}
		// for(auto it : primeList){
			// cout << it << " ";
		}
		cout << primeList[n-1] << endl;
		primeCnt = 0;
		primeList.clear();
	}
}

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

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

char ToLower(char c);
void main (void); 


char ToLower(char c){
    if ( c >= 'A' && c <= 'Z' )    /* もし大文字なら */
        return (c + 'a' - 'A');    /* 小文字に変換 */
    else                           /* 小文字ならそのままリターン */
        return (c);
}



void main(void){
    int i=0;
int x=0;
int j = 0;
    char f[256]="z";
    char s1[256]="";
    scanf("%d",&x);


    for(j;j<0;j++){
        i=0;
        while(s1[i]!=0){
        s1[i]=ToLower(s1[i]);
        i++;
        }

        if(strcmp(f,s1)==1){
            strcpy(f,s1);

        }


    }
    printf("%s\n",f);
}

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

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

string a[1000];
int n;

int main() {
	cin >> n;
	if (n > 1000) abort();
	for (int i = 0; i < n; i++)
		cin >> a[i];
	sort(a, a + n);
	cout << a[0] << endl;
}

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

#include <iostream>
#include <cstdio>
#include <vector>
#include <string>

using namespace std;

int main(){
	int n;
	cin >> n;
	
	vector<string> v(n);
	for(int i = 0; i < n; ++i)
	{
		cin >> v[i];
	}
	
	sort(v.begin(), v.end());

	cout << v[0] << endl;

	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   18 |         sort(v.begin(), v.end());
      |         ^~~~
      |         short
Language: C++

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


int main() {
	int n;
	string>>mins;
	cin>>n;
	cin>>mins;
	for(int i=1,i<n,i++){
		string s;
		cin>>s;
		if(mins>s){
			mins=s;
		}
	}
	cin<<mins<<endl;
	// your code goes here
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected unqualified-id before '>>' token
    8 |         string>>mins;
      |               ^~
a.cc:10:14: error: 'mins' was not declared in this scope
   10 |         cin>>mins;
      |              ^~~~
a.cc:11:22: error: expected ';' before '<' token
   11 |         for(int i=1,i<n,i++){
      |                      ^
      |                      ;
a.cc:11:22: error: expected primary-expression before '<' token
a.cc:11:28: error: expected ';' before ')' token
   11 |         for(int i=1,i<n,i++){
      |                            ^
      |                            ;
Language: C++

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


int main() {
	int n;
	string>>mins;
	cin>>n;
	cin>>mins;
	for(int i=1;i<n;i++){
		string s;
		cin>>s;
		if(mins>s){
			mins=s;
		}
	}
	cin<<mins<<endl;
	// your code goes here
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected unqualified-id before '>>' token
    8 |         string>>mins;
      |               ^~
a.cc:10:14: error: 'mins' was not declared in this scope
   10 |         cin>>mins;
      |              ^~~~
Language: C++

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


int main() {
	int n;
	string>>mins;
	cin>>n;
	cin>>mins;
	for(int i=1;i<n;i++){
		string s;
		cin>>s;
		if(mins>s){
			mins=s;
		}
	}
	cout<<mins<<endl;
	// your code goes here
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected unqualified-id before '>>' token
    8 |         string>>mins;
      |               ^~
a.cc:10:14: error: 'mins' was not declared in this scope
   10 |         cin>>mins;
      |              ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <string>

using namespace std;
int
main(int argc, char ** argv) {
  int n;
  cin >> n;
  vector<string> vs;
  for (int i=0; i<n; ++i) {
    string s{""};
    cin >> s;
    vs.push_back(s);
  }
  sort(vs.begin(), vs.end() ) ;
  cout << vs[0] << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:16:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   16 |   sort(vs.begin(), vs.end() ) ;
      |   ^~~~
      |   short
Language: C++

#include <algorithm>
#include <string>
#include <iosteam>
using namespace std;
string A[1000];
int N;
int main() {
  cin >> N;
  if (N > 1000) abort();
  for (int i = 0; i < N; ++i) cin >> A[i];
  sort(&A[0],&A[N-1]);
  cout << A[0] << endl;
}

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

#include<stdio.h>
#include<string>
int main(){
	int n,j,i,k;
	char moji[22],top[22]={'z'};
	scanf("%d",&n);
	for(i=0;i<=n;i++){
		for(j=0;j<=n;){
		scanf("%c",&moji[j]);
			if(moji[j]=='\n'){
				if(moji[0]-'a'<top[0]-'a'){
					strncpy( top, moji, j );
//					top[j]='\0';
					break;
				}else if(moji[0]-'a'==top[0]-'a'){
					for(k=1;k<20;k++){
						if(moji[k]-'a'<top[k]-'a'){
							strncpy( top,moji,j);
//							top[j]='\0';
							break;
						}
						else if(moji[k]-'a'==top[k]-'a'){}
						else{break;}
					}
				}else{break;}
			}
		j++;
		}
	}
	printf("%s\n",top);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:41: error: 'strncpy' was not declared in this scope
   12 |                                         strncpy( top, moji, j );
      |                                         ^~~~~~~
a.cc:3:1: note: 'strncpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<string>
  +++ |+#include <cstring>
    3 | int main(){
a.cc:18:57: error: 'strncpy' was not declared in this scope
   18 |                                                         strncpy( top,moji,j);
      |                                                         ^~~~~~~
a.cc:18:57: note: 'strncpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include<stdio.h>
#include<string>
int main(){
	int n,j,i,k;
	char moji[22],top[22]={'z'};
	scanf("%d",&n);
	for(i=0;i<=n;i++){
		for(j=0;j<=n;){
		scanf("%c",&moji[j]);
			if(moji[j]=='\n'){
				if(moji[0]-'a'<top[0]-'a'){
					strncpy( top, moji, j );
					break;
				}else if(moji[0]-'a'==top[0]-'a'){
					for(k=1;k<20;k++){
						if(moji[k]-'a'<top[k]-'a'){
							strncpy( top,moji,j);
							break;
						}
						else if(moji[k]-'a'==top[k]-'a'){}
						else{break;}
					}
				}else{break;}
			}
		j++;
		}
	}
	printf("%s\n",top);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:41: error: 'strncpy' was not declared in this scope
   12 |                                         strncpy( top, moji, j );
      |                                         ^~~~~~~
a.cc:3:1: note: 'strncpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<string>
  +++ |+#include <cstring>
    3 | int main(){
a.cc:17:57: error: 'strncpy' was not declared in this scope
   17 |                                                         strncpy( top,moji,j);
      |                                                         ^~~~~~~
a.cc:17:57: note: 'strncpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include<stdio.h>

int main()
{
   int n,i,j,k;
   char tan[21];
   char tan2[21];

   for(i=0;i<21;i++){
      tan[i]=0;
      tan2[i]=0;
   }
   tan2[0]='z';

   scanf("%d",&n);

   for(i=0;i<n;i++){
      scanf("%s",tan);
      for(k=0;k<20;k++){
         if(tan[k]>tan2[k]) break;
         if(tan[k]<tan2[k]){
            for(j=0;j<20;J++){
               tan2[j]=tan[j];
            }
            break;
        }
      }
   }
   printf("%s\n",tan);
   return 0;
}

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


#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <math.h>
#include <string.h>
#include <stack>
#include <cctype>

using namespace std;


int main(){

	int n;
	string str,temp;

	cin>>n;
	cin>>str;
	for(int i=1;i<n;i++){
		cin>>temp;
		if(temp<str) str=temp
	}
	cout<<str;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:38: error: expected ';' before '}' token
   22 |                 if(temp<str) str=temp
      |                                      ^
      |                                      ;
   23 |         }
      |         ~
Language: C++

#include<iostream>
#include<string>
#include<vector>
using namespace std;
 
int main(){
	string s;
	vector<string> str_list;
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>s;
		str_list.push_back(s);
	}
	sort(str_list.begin(),str_list.end());
	cout<<str_list[0]<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   15 |         sort(str_list.begin(),str_list.end());
      |         ^~~~
      |         short
Language: C++

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

int main(){
	int num;
	string *word, tmp;

	cin >> num;
	word = new string[num];
	for(int i = 0; i < num; i++)
		cin >> word[i];
	for(int i = 1; i < num; i++){
		if(word[0] > word[i]){
			tmp = word[0];
			word[0] = word[i];
			word[i] = tmp;
		}
	}
	cout << word[0] << endl;
	delete word[];
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:21: error: expected primary-expression before ']' token
   21 |         delete word[];
      |                     ^
Language: C++

#include <iostream>
#include <string>

int main(void) {
  string str[1000];

  cin >> n;

  for(int i = 0; i < n; i++) {
    cin >> str[i];
  }

  for(int i = 1; i < n; i++) {
    string temp;
    
    if(str[i] < str[0]) {
      temp = str[0];
      str[0] = str[i];
      str[i] = temp;
    }
  }

  cout << str[0];
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string str[1000];
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> n;
      |   ^~~
      |   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:10: error: 'n' was not declared in this scope
    7 |   cin >> n;
      |          ^
a.cc:10:12: error: 'str' was not declared in this scope; did you mean 'std'?
   10 |     cin >> str[i];
      |            ^~~
      |            std
a.cc:14:11: error: expected ';' before 'temp'
   14 |     string temp;
      |           ^~~~~
      |           ;
a.cc:16:8: error: 'str' was not declared in this scope; did you mean 'std'?
   16 |     if(str[i] < str[0]) {
      |        ^~~
      |        std
a.cc:17:7: error: 'temp' was not declared in this scope; did you mean 'tm'?
   17 |       temp = str[0];
      |       ^~~~
      |       tm
a.cc:23:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   23 |   cout << str[0];
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:23:11: error: 'str' was not declared in this scope; did you mean 'std'?
   23 |   cout << str[0];
      |           ^~~
      |           std
Language: C++

#include <iostream>
#include <string>
#include <vector>

using namespace std;

int main()
{
    vector<string> str_vec;
    string str;
    int tmp;
    cin >> tmp;
    while (cin) {
	cin >> str;
	str_vec.push_back(str);
    }
    sort(str_vec.begin(), str_vec.end());
    cout << str_vec.at(0) << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   17 |     sort(str_vec.begin(), str_vec.end());
      |     ^~~~
      |     short
Language: C++

#include <iostream>
#include <string>
#include <vector>

using namespace std;

int main()
{
    vector<string> str_vec;
    string str;
    int tmp;
    cin >> tmp;
    while (cin) {
	cin >> str;
	str_vec.push_back(str);
    }
    std::sort(str_vec.begin(), str_vec.end());
    cout << str_vec.at(0) << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   17 |     std::sort(str_vec.begin(), str_vec.end());
      |          ^~~~
      |          qsort
Language: C++

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

int main(){
char f,tan[22],b[22];
int i,j,k,n;
scanf("%d",&n);
scanf("%s",b)
for(i=1;i<n;i++){
scanf("%s",tan);
if(tan[0]-'a'<b[0]-'a'){
for(j=0;tan[j]!='\0';j++){
b[j]=tan[j];
}
b[j]='\0';
}
else if(tan[0]-'a'==b[0]-'a'){
for(j=1;tan[j]-'a'!=b[j]-'a';j++);
if(tan[j]-'a'>b[j]-'a')continue;
else if(tan[j]-'a'<b[j]-'a'){
for(k=0;tan[k}!='\0';k++){
b[k]=tan[k];
}
b[k]='\0';
}
}
}
printf("%s\n",b);

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: expected ';' before 'for'
   10 | scanf("%s",b)
      |              ^
      |              ;
   11 | for(i=1;i<n;i++){
      | ~~~           
a.cc:11:16: error: expected ';' before ')' token
   11 | for(i=1;i<n;i++){
      |                ^
      |                ;
a.cc: At global scope:
a.cc:30:7: error: expected constructor, destructor, or type conversion before '(' token
   30 | printf("%s\n",b);
      |       ^
a.cc:32:1: error: expected unqualified-id before 'return'
   32 | return 0;
      | ^~~~~~
a.cc:33:1: error: expected declaration before '}' token
   33 | }
      | ^
Language: C++

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

int main(){
char f,tan[22],b[22];
int i,j,k,n;
scanf("%d",&n);
scanf("%s",b);
for(i=1;i<n;i++){
scanf("%s",tan);
if(tan[0]-'a'<b[0]-'a'){
for(j=0;tan[j]!='\0';j++){
b[j]=tan[j];
}
b[j]='\0';
}
else if(tan[0]-'a'==b[0]-'a'){
for(j=1;tan[j]-'a'!=b[j]-'a';j++);
if(tan[j]-'a'>b[j]-'a')continue;
else if(tan[j]-'a'<b[j]-'a'){
for(k=0;tan[k}!='\0';k++){
b[k]=tan[k];
}
b[k]='\0';
}
}
}
printf("%s\n",b);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:14: error: expected ']' before '}' token
   23 | for(k=0;tan[k}!='\0';k++){
      |              ^
      |              ]
a.cc:23:14: error: expected ';' before '}' token
   23 | for(k=0;tan[k}!='\0';k++){
      |              ^
      |              ;
a.cc:23:14: error: expected primary-expression before '}' token
a.cc:23:14: error: expected ')' before '}' token
   23 | for(k=0;tan[k}!='\0';k++){
      |    ~         ^
      |              )
a.cc:23:14: error: expected primary-expression before '}' token
a.cc:23:15: error: expected primary-expression before '!=' token
   23 | for(k=0;tan[k}!='\0';k++){
      |               ^~
a.cc:23:25: error: expected ';' before ')' token
   23 | for(k=0;tan[k}!='\0';k++){
      |                         ^
      |                         ;
a.cc: At global scope:
a.cc:30:7: error: expected constructor, destructor, or type conversion before '(' token
   30 | printf("%s\n",b);
      |       ^
a.cc:31:1: error: expected unqualified-id before 'return'
   31 | return 0;
      | ^~~~~~
a.cc:32:1: error: expected declaration before '}' token
   32 | }
      | ^
Language: C++

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

int main(){
char f,tan[22]={"0"},b[22]={"0"};
int i,j,k,n;
scanf("%d",&n);
scanf("%s",b);
for(i=1;i<n;i++){
scanf("%s",tan);
j=0;
while(1){
if(b[j]>tan[j]){
strcpy(b,tan);
break;
}
else if(b[j]<ta[j])break;
j++;
}
}
printf("%s\n",b);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:14: error: 'ta' was not declared in this scope; did you mean 'tan'?
   19 | else if(b[j]<ta[j])break;
      |              ^~
      |              tan
Language: C++

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

int main() {
    string s, r;
    int n;
    cin >> n >> r;
    for (int i=1; i<n; ++i) {
        cin >> str;
        if (r > s) r = s;
    } 
    cout << res << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: 'str' was not declared in this scope; did you mean 'std'?
   10 |         cin >> str;
      |                ^~~
      |                std
a.cc:13:13: error: 'res' was not declared in this scope
   13 |     cout << res << endl;
      |             ^~~
Language: C++

#include <vector>
#include <iostream>
#include <set>
#include <cstdio>
#include <queue>
#include <cstdio>
#include <cstdlib>
#include <cassert>
#include <ctime>
#include <algorithm>
#include <tuple>
#include <algorithm>
#include <limits>

using namespace std;
typedef long long ll;
typedef pair<char, int> P;
void max(char a[], char b[]) {

}

int main() {
    int n;
    scanf("%d", &n);
    char s[30] = "zzzzzzzzzzzzzzzzzzzzzz";
    for (int i = 0; i < n; i++) {
        char b[30];
        scanf("%s", b);
        if (strcmp(s, b) > 0) {
            strcpy(s, b);
        }
    }
    printf("%s\n", s);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:13: error: 'strcmp' was not declared in this scope
   29 |         if (strcmp(s, b) > 0) {
      |             ^~~~~~
a.cc:14:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   13 | #include <limits>
  +++ |+#include <cstring>
   14 | 
a.cc:30:13: error: 'strcpy' was not declared in this scope
   30 |             strcpy(s, b);
      |             ^~~~~~
a.cc:30:13: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include <iostream>
using namespace std;

int main() {
int n;
char ch1,ch2;
cin >> n;
cin >>ch1;
       for(int i=0;i<n-1;i++){
       cin>> ch2;    
        if(ch1>ch2) ch1=ch2
   
      }

 cout << ch1;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:28: error: expected ';' before '}' token
   11 |         if(ch1>ch2) ch1=ch2
      |                            ^
      |                            ;
   12 | 
   13 |       }
      |       ~
Language: C++

#include<iostream>
#include<cstdio>
#include<string>
#include<vector>
#include<set>

using namespace std;

int main(){
    int num;
    set<string> str1;
    
    cin >> num;
    
    for( int i = 0; i < num; i++){
        string str2;
        cin >> str2;
        str1.push_back(str2);
    }
    
    set<string>::iterator p;
    p = str1.begin();
    
    while( p != p.end()){
        cout << *p << endl;
        p++;
    }
    
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:14: error: 'class std::set<std::__cxx11::basic_string<char> >' has no member named 'push_back'
   18 |         str1.push_back(str2);
      |              ^~~~~~~~~
a.cc:24:19: error: 'std::set<std::__cxx11::basic_string<char> >::iterator' {aka 'std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::__cxx11::basic_string<char> > >::const_iterator'} has no member named 'end'
   24 |     while( p != p.end()){
      |                   ^~~
Language: C++

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

#define loop(i,a,b) for(int i=a; i<int(b); i++)
#define rep(i,b) loop(i,0,b)

string s[1000000];

using namespace std;
int main(){
  int n;
  cin >> n;
  rep(i,n){
    cin>>s[i];
  }
  sort(s,s+n);
  cout << s[0] << endl;
}

Compiler output:
a.cc:9:1: error: 'string' does not name a type; did you mean 'stdin'?
    9 | string s[1000000];
      | ^~~~~~
      | stdin
a.cc: In function 'int main()':
a.cc:16:10: error: 's' was not declared in this scope
   16 |     cin>>s[i];
      |          ^
a.cc:18:8: error: 's' was not declared in this scope
   18 |   sort(s,s+n);
      |        ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
　int n;
string ans;
cin>>n>>ans;
for(int i=1;i<n;i++)
{
string tmp;
cin>>tmp;
if(ans>tmp)
ans=tmp;
}
cout<<ans<<endl;
}

Compiler output:
a.cc:5:1: error: extended character 　 is not valid in an identifier
    5 | 　int n;
      | ^
a.cc: In function 'int main()':
a.cc:5:1: error: '\U00003000int' was not declared in this scope
    5 | 　int n;
      | ^~~~~
a.cc:7:6: error: 'n' was not declared in this scope
    7 | cin>>n>>ans;
      |      ^
Language: Java

import java.io.*;
public class PrintTestCases{
    public static void main(String[] args) throws IOException{
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String num;
        int i = 1;

        num = in.readLine();
        while(!(num.equals("0"))){
            System.out.printf("Case %s: %s%n", i, num);
            i++;
            num = in.readLine();
        }
    }
}

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

import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class PrintTestCases{
    public static void main(String[] args) throws IOException{
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        ArrayList<String> st = new ArrayList<String>();
        String num;

        while(true){
            num = in.readLine();
            if(num=="0") break;
            st.add(num);
        }

        int i=1;
        for(String a: st){
            System.out.println("Case " + i + ": " + a);
            i++;
        }
    }
}

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

import java.util.Scanner;
public class Main{
    public static void main(String[] args)
    {
        int i = 1;
        int x;
        Scanner scan = new Scanner(System.in);
        while (true){
            x = scan.nextInt();
            if (x == 0){
                break;
            }
            System.out.println("Case " + i + ":" + x " ");
            i++;
        }
    }
}

Compiler output:
Main.java:13: error: ')' or ',' expected
            System.out.println("Case " + i + ":" + x " ");
                                                    ^
1 error
Language: Java

import java.util.Scanner;
public class Main{
    public static void main(String[] args)
    {
        int i = 1;
        int x;
        Scanner scan = new Scanner(System.in);
        while (true){
            x = scan.nextInt();
            if (x == 0){
                break;
            }
            System.out.println("Case " + i + ":" + x 　+ " ");
            i++;
        }
    }
}

Compiler output:
Main.java:13: error: illegal character: '\u3000'
            System.out.println("Case " + i + ":" + x ?+ " ");
                                                     ^
1 error
Language: Java

import java.util.Scanner;
  
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
for (int i = 1; i++){
int x sc.nextInt()
if ( x == 0 ) {
break;
}
System.out.println("Case " + i + ": " + x);
}
}
}
 

Compiler output:
Main.java:6: error: ';' expected
for (int i = 1; i++){
                   ^
Main.java:7: error: ';' expected
int x sc.nextInt()
     ^
Main.java:7: error: ';' expected
int x sc.nextInt()
                  ^
3 errors
Language: Java

import java.util.Scanner;
  
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
for (int i = 1; i > 0; i++){
int x sc.nextInt() ;
if ( x == 0 ) {
break;
}
System.out.println("Case " + i + ": " + x);
}
}
}

Compiler output:
Main.java:7: error: ';' expected
int x sc.nextInt() ;
     ^
1 error
Language: Java

import java.util.Scanner;

public class Main {
public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int i=0;
	int num[100];
	for(i=0;i<100;i++){
		num[i]=sc.nextInt();
		if(num[i]==0){break;}
	}
	for(int j=0;j<i;j++){
		System.out.printf("Case %d: %d\n",j+1,num[j]);}
}
	}

Compiler output:
Main.java:7: error: ']' expected
	int num[100];
	        ^
1 error
Language: Java

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

public class Main{
	public static void main(String[] args){
		int i,x;
		i=1;
		Scanner sc;
		while(1){
			sc = new Scanner(System.in);
			x = sc.nextInt();
			if(x!=0){
				System.out.println("Case "+i+": "+x);
				i++;
			}else{
				break;
			}
		}
	}
}

Compiler output:
Main.java:9: error: incompatible types: int cannot be converted to boolean
		while(1){
		      ^
1 error
Language: Java

import java.util.Scanner;
 
public class Main{
    public static void main(String[] args){
    	int a;
    	int n =1;
    	while(a!=0){
    		Scanner sc = new Scanner(System.in);
    		int a = sc.nextInt();
    		System.out.println("Case %d:%d",n,a);
    		n++;
    	}

Compiler output:
Main.java:12: error: reached end of file while parsing
    	}
    	 ^
1 error
Language: Java

import java.util.Scanner;
 
public class Main{
    public static void main(String[] args){
    	int a;
    	int n =1;
    	while(a!=0){
    		Scanner sc = new Scanner(System.in);
    		int a = sc.nextInt();
    		System.out.println("Case %d:%d",n,a);
    		n++;
    	}
}
}

Compiler output:
Main.java:9: error: variable a is already defined in method main(String[])
    		int a = sc.nextInt();
    		    ^
Main.java:10: error: no suitable method found for println(String,int,int)
    		System.out.println("Case %d:%d",n,a);
    		          ^
    method PrintStream.println() is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(boolean) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(int) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(long) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(float) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(double) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char[]) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(String) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(Object) is not applicable
      (actual and formal argument lists differ in length)
2 errors
Language: Java

import java.util.Scanner;

public class Main4 {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		for(int i = 1; ; i++){
			int x = sc.nextInt();
			switch (x){
				case 0:
					break;
				default :
					System.out.println("Case i:%d",x);
			}
		}
	}
}
			

Compiler output:
Main.java:3: error: class Main4 is public, should be declared in a file named Main4.java
public class Main4 {
       ^
Main.java:12: error: no suitable method found for println(String,int)
					System.out.println("Case i:%d",x);
					          ^
    method PrintStream.println() is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(boolean) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(int) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(long) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(float) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(double) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char[]) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(String) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(Object) is not applicable
      (actual and formal argument lists differ in length)
2 errors
Language: Java

import java.util.Scanner;,
 
public class Main{
    public static void main(String[] args){
    	
    	Scanner sc = new Scanner(System.in);
    	for(int != 1;;i++){
    		int x = sc.nextInt();
    		System.out.printlf("Case %d: %d",i,x);

    		if(x==0){
    			break;
    		}
    	}
    }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
import java.util.Scanner;,
                         ^
Main.java:7: error: not a statement
    	for(int != 1;;i++){
    	    ^
Main.java:7: error: ';' expected
    	for(int != 1;;i++){
    	       ^
Main.java:7: error: illegal start of expression
    	for(int != 1;;i++){
    	        ^
Main.java:7: error: illegal start of expression
    	for(int != 1;;i++){
    	             ^
Main.java:7: error: ';' expected
    	for(int != 1;;i++){
    	                 ^
6 errors
Language: Java

import java.util.Scanner;
public class PrintTestCases {
public static void main(String[] args) {
// ?¨??????\???????????????????????????????????????
Scanner sc = new Scanner(System.in);
// ????????????????????????????????´??°?????¨???????????????????????? 
for (int i = 1; ; i++) {
int x = sc.nextInt();
if(x==0)break;
// x???0?????????????????????????????? Case i: x ?????¢?????§???????????????!
// ...
System.out.println("Case"+ i + ": " + x);
}
}
}

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

import java.util.Scanner;
public class PrintTestCases {
public static void main(String[] args) {
// ?¨??????\???????????????????????????????????????
Scanner sc = new Scanner(System.in);
// ????????????????????????????????´??°?????¨???????????????????????? 
for (int i = 1; ; i++) {
int x = sc.nextInt();
if(x==0){break;}
// x???0?????????????????????????????? Case i: x ?????¢?????§???????????????!
// ...
System.out.println("Case"+ i + ": " + x);
}
}
}

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

import java.util.Scanner;
public class PrintTestCases {
public static void main(String[] args) {
// ?¨??????\???????????????????????????????????????
Scanner sc = new Scanner(System.in);
// ????????????????????????????????´??°?????¨???????????????????????? 
for (int i = 1; ; i++) {
int x = sc.nextInt();
if(x==0)break;
System.out.println("Case"+ i + ": " + x);
}
}
}

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

import java.util.Scanner;
public class Main
{
  public static void main(String[] args)
  {
    Scanner sc = new Scanner(System.in);
    for (int i = 1; i <x; i++)
    {
      int x = sc.nextInt();
      if(x == 0)
      {
      }
      else
      {
      System.out.printf("Case %d: %d\n", i, x);
      }
    }
  }
}

Compiler output:
Main.java:7: error: cannot find symbol
    for (int i = 1; i <x; i++)
                       ^
  symbol:   variable x
  location: class Main
1 error
Language: Java

import java.util.Scanner;
 
public class Main{
    public static void main(String[] args){
    	
    	Scanner sc = new Scanner(System.in);
    	for(int i = 1; ; i++){
    		int x = sc.nextInt();
    		System.out.println("Case %d: %d",i,x);

    		if(x==0){
    			break;
    		}
    	}
    }
}

Compiler output:
Main.java:9: error: no suitable method found for println(String,int,int)
    		System.out.println("Case %d: %d",i,x);
    		          ^
    method PrintStream.println() is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(boolean) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(int) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(long) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(float) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(double) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char[]) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(String) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(Object) is not applicable
      (actual and formal argument lists differ in length)
1 error
Language: Java

import java.util.Scanner;

public class Main4 {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		for(int i = 1; ; i++){
			int x = sc.nextInt();
			switch (x){
				case 0:
					break;
				default :
					System.out.printf("Case i: %d\n", x);
			}
		}
	}
}
			

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

import java.util.Scanner;

public class Main4 {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		for(int i = 1; ; i++){
			int x = sc.nextInt();
			switch (x){
				case 0:
					break;
				default :
					System.out.printf("Case %d: %d\n", i, x);
			}
		}
	}
}
			

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

import java.util.Scanner;
 
public class Main{
    public static void main(String[] args){
    	
    	Scanner sc = new Scanner(System.in);
    	for(int i = 1; ; i++){
    		int x = sc.nextInt();
    		System.out.println("Case "+i+": "+x+);

    		if(x==0){
    			break;
    		}
    	}
    }
}

Compiler output:
Main.java:9: error: illegal start of expression
    		System.out.println("Case "+i+": "+x+);
    		                                    ^
1 error
Language: Java

import java.util.Scanner;

public class Main4 {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		for(int i = 1; ; i++){
			int x = sc.nextInt();
			if (x == 0){
				break;
			}else{
				System.out.printf("Case %d: %d\n", i, x);
			}
		}
	}
}
			

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