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

#include <stdio.h>

int main() {
    int x;
    for(int i=1;; i++)
        scanf("%d", &x);
        if (x == 0) return 0;
        printf("Case %d: %d",i ,x);
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:30: error: 'i' was not declared in this scope
    8 |         printf("Case %d: %d",i ,x);
      |                              ^
a.cc: At global scope:
a.cc:10:1: error: expected declaration before '}' token
   10 | }
      | ^
Language: C++

#include <stdio.h>

int main() {
    int x;
    for(int i=1;; i++) {
        scanf("%d", &x);
        if(x == 0) return;
        printf("Case %d: %d\n",i ,x);
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: return-statement with no value, in function returning 'int' [-fpermissive]
    7 |         if(x == 0) return;
      |                    ^~~~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
using namespace std;
typedef long long unsigned int ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

int main() {
  int x,i;
  x = 1;
  i = 0;
  while(TRUE){
    cin >> x;
    i += 1;
    if(x == 0) break;
    cout << "Case " << i << ": " << x << endl;
  }
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:27:9: error: 'TRUE' was not declared in this scope
   27 |   while(TRUE){
      |         ^~~~
Language: C++

num = 1
while True:
    x = int(input())
    if x == 0: break
    print ("Case {0}: {1}".format(num,x))
    num += 1


Compiler output:
a.cc:1:1: error: 'num' does not name a type; did you mean 'enum'?
    1 | num = 1
      | ^~~
      | enum
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int c=1,x;
	while(true) {
	  cin >> x;
	  if(x == 0) {
	    break;
	  }
	  cout << "Case " << c <<": " << x << endl;
	  c++  
	}
}


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

#include <iostream>
using namespace std;

int main() {
  int x;
  while(){
    int index = 1;
    cin >> x;
    if(x == 0) { return 0; }
    cout << "Case " << index << ": " << x << endl;
    index++;
  }
}
    
    

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: expected primary-expression before ')' token
    6 |   while(){
      |         ^
Language: C++

#include <iostream>
using namespace std;

int main(){

 int i;
 i = 1;

 while(1) {
  cin >> x;
  if (x == 0) break;
  cout << "Case " << i++ << ": " << x;
 }

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: 'x' was not declared in this scope
   10 |   cin >> x;
      |          ^
Language: C++

#include <iostream>
using namespace std;
  
int main()
{
  int i, a[];
  for(i=1;i++)
  {
    cin >>a[i];
    if a[i]=0; {break;}
    else
    {
      cout<<"Case "<<i<<": "<<a[i]<<"\n";
    }
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: storage size of 'a' isn't known
    6 |   int i, a[];
      |          ^
a.cc:7:14: error: expected ';' before ')' token
    7 |   for(i=1;i++)
      |              ^
      |              ;
a.cc:10:8: error: expected '(' before 'a'
   10 |     if a[i]=0; {break;}
      |        ^
      |        (
a.cc:11:5: error: 'else' without a previous 'if'
   11 |     else
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;
   
int main()
{
  int i, a;
  for(i=1;i++)
  {
    cin >>a;
    if(a=0)
    {
      break;
    }
    else
    {
      cout<<"Case "<<i<<": "<<a[i]<<"\n";
    }
  }
   
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: expected ';' before ')' token
    7 |   for(i=1;i++)
      |              ^
      |              ;
a.cc:16:32: error: invalid types 'int[int]' for array subscript
   16 |       cout<<"Case "<<i<<": "<<a[i]<<"\n";
      |                                ^
Language: C++

#include <iostream>
using namespace std;
    
int main()
{
  int i, a;
  for(i=1;i++)
  {
    cin >>a;
    if(a=0)
    {
      break;
    }
    else
    {
      cout<<"Case "<<i<<": "<<a<<"\n";
    }
  }
    
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: expected ';' before ')' token
    7 |   for(i=1;i++)
      |              ^
      |              ;
Language: C++

#include <iostream>
using namespace std;
     
int main()
{
  int i, a;
  for(i=1; i++)
  {
    cin >>a;
    if(a=0)
    {
      break;
    }
    else
    {
      cout<<"Case "<<i<<": "<<a<<"\n";
    }
  }
     
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: expected ';' before ')' token
    7 |   for(i=1; i++)
      |               ^
      |               ;
Language: C++

#include <iostream>
using namespace std;
      
int main()
{
  int a;
  while()
  {
    cin >>a;
    if(a=0)
    {
      break;
    }
    else
    {
      cout<<"Case "<<i<<": "<<a<<"\n";
    }
  }
      
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: expected primary-expression before ')' token
    7 |   while()
      |         ^
a.cc:16:22: error: 'i' was not declared in this scope
   16 |       cout<<"Case "<<i<<": "<<a<<"\n";
      |                      ^
Language: C++

#include <iostream>
using namespace std;
       
int main()
{
  int a;
  while(1)
  {for(i==1;i++)
  {
    cin >>a;
    if(a=0)
    {
      break;
    }
    else
    {
      cout<<"Case "<<i<<": "<<a<<"\n";
    }
  }}
       
  return 0;
}

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

#include <iostream>
using namespace std;
        
int main()
{
  int a, i;
  while(1)
  {for(i==1;i++)
  {
    cin >>a;
    if(a=0)
    {
      break;
    }
    else
    {
      cout<<"Case "<<i<<": "<<a<<"\n";
    }
  }}
        
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before ')' token
    8 |   {for(i==1;i++)
      |                ^
      |                ;
Language: C++

#include <iostream>
using namespace std;
         
int main()
{
  int i, x;
  while(1)
  {
    for(i==1;i++)
    {
      cin >>x;
      if(x=0)
      {
        break;
      }
      else
      {
        cout <<"Case "<<i<<": "<<x;  
      }
    }
  }
       
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: expected ';' before ')' token
    9 |     for(i==1;i++)
      |                 ^
      |                 ;
Language: C++

#include <iostream>
using namespace std;
int main(){
while () {
int x;
cin >> x;
if (x == 0) break
cout << "Case " << x << ": " << x; 
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:8: error: expected primary-expression before ')' token
    4 | while () {
      |        ^
a.cc:7:18: error: expected ';' before 'cout'
    7 | if (x == 0) break
      |                  ^
      |                  ;
    8 | cout << "Case " << x << ": " << x;
      | ~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
    int i = 1;
    int a
    do{
        cin >> a;
        if (a != 0){
            cout << "Case " << i << ": " << a << endl;
            i++
        }
    } while (a!=0)
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: expected initializer before 'do'
    6 |     do{
      |     ^~
a.cc:12:14: error: 'a' was not declared in this scope
   12 |     } while (a!=0)
      |              ^
a.cc:13:1: error: expected primary-expression before '}' token
   13 | }
      | ^
Language: C++

#include <iostream>
using namespace std;
int main(){
    int i = 1;
    int a;
    do{
        cin >> a;
        if (a != 0){
            cout << "Case " << i << ": " << a << endl;
            i++;
        }
    } while (a!=0)
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: expected ';' before '}' token
   12 |     } while (a!=0)
      |                   ^
      |                   ;
   13 | }
      | ~
Language: C++

#include <iostream>
using namespace std;

int main()
{
  int case = 1;
  int x;
  cin >> x;
  while(x != 0){
    cout << "Case " << case << ": " << x << endl;
    case++;
    cin >> x;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: expected unqualified-id before 'case'
    6 |   int case = 1;
      |       ^~~~
a.cc:10:24: error: expected primary-expression before 'case'
   10 |     cout << "Case " << case << ": " << x << endl;
      |                        ^~~~
a.cc:11:11: error: expected primary-expression before ';' token
   11 |     case++;
      |           ^
a.cc:11:5: error: case label '<expression error>' not within a switch statement
   11 |     case++;
      |     ^~~~
a.cc:11:11: error: expected ':' before ';' token
   11 |     case++;
      |           ^
      |           :
Language: C++

using namespace std;
int main(){
	int x;
	int i=0;
	for(;;){
		
		i++;
		cin>>x;
		if(x==0){
			break;
		}
		cout<<"Case "<<i<<": "<<x<<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: 'cin' was not declared in this scope
    8 |                 cin>>x;
      |                 ^~~
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:12:17: error: 'cout' was not declared in this scope
   12 |                 cout<<"Case "<<i<<": "<<x<<endl;
      |                 ^~~~
a.cc:12:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:44: error: 'endl' was not declared in this scope
   12 |                 cout<<"Case "<<i<<": "<<x<<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: C++

#include <iostream>
using namespace std;

int main()
{
    int x;

    for (int i = 1, cin >> x; x; cin >> x){
        cout << "Case " << i << " " << x << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: expected ';' before '>>' token
    8 |     for (int i = 1, cin >> x; x; cin >> x){
      |                        ^~~
      |                        ;
a.cc:8:25: error: expected primary-expression before '>>' token
    8 |     for (int i = 1, cin >> x; x; cin >> x){
      |                         ^~
a.cc:8:32: error: expected ')' before ';' token
    8 |     for (int i = 1, cin >> x; x; cin >> x){
      |         ~                      ^
      |                                )
a.cc:8:42: error: expected ';' before ')' token
    8 |     for (int i = 1, cin >> x; x; cin >> x){
      |                                          ^
      |                                          ;
Language: C++

#include<stfio.h>
int main(void)
{
	int i,x;
	int r[10];
	i=0;
	while(1){
		
			

			scanf("%d",&x);
			if(x==0)break;
			r[i]=x;
			i++;
		
		}
	for(int t=0;t<i;t++)
		printf("Case %d: %d\n",(t+1),r[t]);
		return 0;

}

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

#include<stdio.h>
int main(void)
{
	queue<int> que1,que2;
	int x1,y2,tmp,count;
	tmp=count=0;
	do{
	scanf("%d",&x1);scanf("%d",&y2);
	if(x1==0)
	if(y2==0)break;

	if(x1<y2){
		tmp=x1;x1=y2;y2=tmp;
	}
	que1.push(x1);
	que2.push(y2);

	count++;
	}while(x1!=0||y2!=0);

	for(int i=0;i<count;i++)
	{
		printf("%d %d\n",que1.front(),que2.front());
		que1.pop();que2.pop();

	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'queue' was not declared in this scope
    4 |         queue<int> que1,que2;
      |         ^~~~~
a.cc:4:15: error: expected primary-expression before 'int'
    4 |         queue<int> que1,que2;
      |               ^~~
a.cc:15:9: error: 'que1' was not declared in this scope
   15 |         que1.push(x1);
      |         ^~~~
a.cc:16:9: error: 'que2' was not declared in this scope
   16 |         que2.push(y2);
      |         ^~~~
a.cc:23:34: error: 'que1' was not declared in this scope
   23 |                 printf("%d %d\n",que1.front(),que2.front());
      |                                  ^~~~
a.cc:23:47: error: 'que2' was not declared in this scope
   23 |                 printf("%d %d\n",que1.front(),que2.front());
      |                                               ^~~~
Language: C++

package aoj4;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        StringBuilder builder = new StringBuilder();
        
        int i = 1;
        while(sc.hasNext()) {
            int value = sc.nextInt();
            if (value == 0) break;
            
            if (i > 1) builder.append("\n");
            builder.append("Case ").append(i);
            i++;
        }
    }
}

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

package aoj4;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        StringBuilder builder = new StringBuilder();
        
        int i = 1;
        while(sc.hasNext()) {
            int value = sc.nextInt();
            if (value == 0) break;
            
            if (i > 1) builder.append("\n");
            builder.append("Case ").append(i).append(": ").append(value);
            i++;
        }
    }
}

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

#include <stdio.h>
int main(){
	int i=1, x;
	for(;;) {
		scanf_s("%d", &x);
		if (x == 0) {
			break;
		}
		else{
			printf("Case %d: %d\n", i, x);
			i++;

		}
		
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    5 |                 scanf_s("%d", &x);
      |                 ^~~~~~~
      |                 scanf
Language: C++

#include <iostream>
using namespace std;
int main(){
    int x;
    for (int i = 1;; ++i){
    cin >> x;
    if(x == 0){
     break;
    }else{
    cout << "Case " << "i" << x << endl;
    }
}

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

#include <iostream>
using namespace std;
int main(){
    int x;
    for (int i=1;;i++){
    cin >> x;
    if(x == 0){
     break;
    }else{
    cout << "Case " << "i" << x << endl;
    }
    return 0;
}

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

#include <iostream>
using namespace std;
int main(){
    int x;
    for(int i=1;;i++){
    cin >> x;
    if(x == 0){
     break;
    }else{
    cout << "Case " << "i" << ": " << x << endl;
    }
    return 0;
}

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

#include <iostream>
using namespace std;

int main () {
 int x,i = 1;

 while (cin >> x) {
  if (x = 0) {
   break;
  } else {
   cout << "Case " << i << ':' << x << endl;
   i++;
  }  

 return 0;
}

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

import java.util.*;
class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int x;
        while(true){
            x=sc.nextInt();
            if(x==0)break;
            System.out.println(x);
        }
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:11: error: expected ':' before 'static'
    3 |     public static void main(String[] args){
      |           ^~~~~~~
      |           :
a.cc:3:29: error: 'String' has not been declared
    3 |     public static void main(String[] args){
      |                             ^~~~~~
a.cc:3:38: error: expected ',' or '...' before 'args'
    3 |     public static void main(String[] args){
      |                                      ^~~~
a.cc:12:2: error: expected ';' after class definition
   12 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:4:9: error: 'Scanner' was not declared in this scope
    4 |         Scanner sc=new Scanner(System.in);
      |         ^~~~~~~
a.cc:7:15: error: 'sc' was not declared in this scope
    7 |             x=sc.nextInt();
      |               ^~
a.cc:9:13: error: 'System' was not declared in this scope
    9 |             System.out.println(x);
      |             ^~~~~~
Language: C++

#include<stdio.h>

int main(void){

int x,i = 1;

while(x != 0){

	scanf(""%d",&x);
	print("Case %d: %d",i,x);
	++i;
	}
	
	return 0;
}

Compiler output:
a.cc:9:19: warning: missing terminating " character
    9 |         scanf(""%d",&x);
      |                   ^
a.cc:9:19: error: missing terminating " character
    9 |         scanf(""%d",&x);
      |                   ^~~~~~
a.cc: In function 'int main()':
a.cc:9:18: error: 'd' was not declared in this scope
    9 |         scanf(""%d",&x);
      |                  ^
Language: C++

#include<stdio.h>

int main(void)
{

int num[];
int i,j;

for(i=0;num[]=0;i++){
scanf("%d",&num[]);
}

for(j=0,num=0;j++){
printf("Case %d : %d\n"j+1,num[j])
}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: storage size of 'num' isn't known
    6 | int num[];
      |     ^~~
a.cc:9:13: error: expected primary-expression before ']' token
    9 | for(i=0;num[]=0;i++){
      |             ^
a.cc:10:17: error: expected primary-expression before ']' token
   10 | scanf("%d",&num[]);
      |                 ^
a.cc:13:18: error: expected ';' before ')' token
   13 | for(j=0,num=0;j++){
      |                  ^
      |                  ;
a.cc:14:8: error: unable to find string literal operator 'operator""j' with 'const char [14]', 'long unsigned int' arguments
   14 | printf("Case %d : %d\n"j+1,num[j])
      |        ^~~~~~~~~~~~~~~~~
Language: C++

#include<stdio.h>

int main(void)
{

int num[];
int i,j;

for(i=0;num[]=0;i++){
scanf("%d",&num[]);
}

for(j=0,num=0;j++){
printf("Case %d : %d\n"j+1,num[j]);
}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: storage size of 'num' isn't known
    6 | int num[];
      |     ^~~
a.cc:9:13: error: expected primary-expression before ']' token
    9 | for(i=0;num[]=0;i++){
      |             ^
a.cc:10:17: error: expected primary-expression before ']' token
   10 | scanf("%d",&num[]);
      |                 ^
a.cc:13:18: error: expected ';' before ')' token
   13 | for(j=0,num=0;j++){
      |                  ^
      |                  ;
a.cc:14:8: error: unable to find string literal operator 'operator""j' with 'const char [14]', 'long unsigned int' arguments
   14 | printf("Case %d : %d\n"j+1,num[j]);
      |        ^~~~~~~~~~~~~~~~~
Language: C++

#include<stdio.h>

int main(void)
{

int num[100];
int i,j;

for(i=0;num[100]=0;i++){
scanf("%d",&num[100]);
}

for(j=0,num[100]=0;j++){
printf("Case %d : %d\n"j+1,num[j]);
}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:23: error: expected ';' before ')' token
   13 | for(j=0,num[100]=0;j++){
      |                       ^
      |                       ;
a.cc:14:8: error: unable to find string literal operator 'operator""j' with 'const char [14]', 'long unsigned int' arguments
   14 | printf("Case %d : %d\n"j+1,num[j]);
      |        ^~~~~~~~~~~~~~~~~
Language: C++

#include<iostream>
using namespace ltd;
int main()
{
int a, ;
cin >> a;
if ( a != 0 )
   {
    cout << a;
   }
else
   {
   return 0;
   }
}

Compiler output:
a.cc:2:17: error: 'ltd' is not a namespace-name
    2 | using namespace ltd;
      |                 ^~~
a.cc: In function 'int main()':
a.cc:5:8: error: expected unqualified-id before ';' token
    5 | int a, ;
      |        ^
a.cc:6:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 | cin >> a;
      | ^~~
      | 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:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout << a;
      |     ^~~~
      |     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>
using namespace std;
int main()
{
int a;
while(1){
cin >> a;
if ( a != 0 )
cout << a;
   {
    cout << a;
   }
else
   {
   return 0;
   }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:1: error: 'else' without a previous 'if'
   13 | else
      | ^~~~
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

 int i,x;
  scanf("%d",&x);
  i=0;

 while(1){
  i=i+1;
    if ( x == 0 ) break;

    printf("Case %d: %d \n",i,x);
    
    scanf("%d",&x);
    }

  return 0;
}

Compiler output:
a.cc:2:8: error: expected constructor, destructor, or type conversion before '(' token
    2 |   scanf("%d",&x);
      |        ^
a.cc:3:3: error: 'i' does not name a type
    3 |   i=0;
      |   ^
a.cc:5:2: error: expected unqualified-id before 'while'
    5 |  while(1){
      |  ^~~~~
a.cc:14:3: error: expected unqualified-id before 'return'
   14 |   return 0;
      |   ^~~~~~
a.cc:15:1: error: expected declaration before '}' token
   15 | }
      | ^
Language: C++

#include<cstdio>

int main(){
	int x;
	int n = 1;
	while(){
		scanf("%d", &x);
		if(x == 0) break;
		printf("Case %d: %d", n, x);
		n++;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: expected primary-expression before ')' token
    6 |         while(){
      |               ^
Language: C++

int main(){
	int a,count;
	for(count=0;;count++){
		cin>>a;
		if(a==0){break;}
		cout<<"Case "<<count+1<<": "<<a<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:17: error: 'cin' was not declared in this scope
    4 |                 cin>>a;
      |                 ^~~
a.cc:6:17: error: 'cout' was not declared in this scope; did you mean 'count'?
    6 |                 cout<<"Case "<<count+1<<": "<<a<<endl;
      |                 ^~~~
      |                 count
a.cc:6:50: error: 'endl' was not declared in this scope
    6 |                 cout<<"Case "<<count+1<<": "<<a<<endl;
      |                                                  ^~~~
Language: C++

#include<iostream>
using namespace std;
 
int main(){
 
for(int x, t = 1; ; t++)
cint >> x;
if ( x = 0 ) break;
cout << "Case " << t << ": " << x << endl;
}
 
return 0;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: 'cint' was not declared in this scope; did you mean 'uint'?
    7 | cint >> x;
      | ^~~~
      | uint
a.cc:8:6: error: 'x' was not declared in this scope
    8 | if ( x = 0 ) break;
      |      ^
a.cc:8:14: error: break statement not within loop or switch
    8 | if ( x = 0 ) break;
      |              ^~~~~
a.cc:9:20: error: 't' was not declared in this scope; did you mean 'tm'?
    9 | cout << "Case " << t << ": " << x << endl;
      |                    ^
      |                    tm
a.cc:9:33: error: 'x' was not declared in this scope
    9 | cout << "Case " << t << ": " << x << endl;
      |                                 ^
a.cc: At global scope:
a.cc:12:1: error: expected unqualified-id before 'return'
   12 | return 0;
      | ^~~~~~
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
 
int main(){
for( int x, t = 1; ; t++ )
cint >> x;
if ( x == 0 ) break;
cout << "Case " << t << ": " << x << endl;
}
 
return 0;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:1: error: 'cint' was not declared in this scope; did you mean 'uint'?
    6 | cint >> x;
      | ^~~~
      | uint
a.cc:7:6: error: 'x' was not declared in this scope
    7 | if ( x == 0 ) break;
      |      ^
a.cc:7:15: error: break statement not within loop or switch
    7 | if ( x == 0 ) break;
      |               ^~~~~
a.cc:8:20: error: 't' was not declared in this scope; did you mean 'tm'?
    8 | cout << "Case " << t << ": " << x << endl;
      |                    ^
      |                    tm
a.cc:8:33: error: 'x' was not declared in this scope
    8 | cout << "Case " << t << ": " << x << endl;
      |                                 ^
a.cc: At global scope:
a.cc:11:1: error: expected unqualified-id before 'return'
   11 | return 0;
      | ^~~~~~
a.cc:13:1: error: expected declaration before '}' token
   13 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
 
int main(){
for( int x, t = 1; ; t++ )
cint >> x;
if ( x == 0 ) break;
cout << "Case " << t << ": " << x << endl;
}

return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:1: error: 'cint' was not declared in this scope; did you mean 'uint'?
    6 | cint >> x;
      | ^~~~
      | uint
a.cc:7:6: error: 'x' was not declared in this scope
    7 | if ( x == 0 ) break;
      |      ^
a.cc:7:15: error: break statement not within loop or switch
    7 | if ( x == 0 ) break;
      |               ^~~~~
a.cc:8:20: error: 't' was not declared in this scope; did you mean 'tm'?
    8 | cout << "Case " << t << ": " << x << endl;
      |                    ^
      |                    tm
a.cc:8:33: error: 'x' was not declared in this scope
    8 | cout << "Case " << t << ": " << x << endl;
      |                                 ^
a.cc: At global scope:
a.cc:11:1: error: expected unqualified-id before 'return'
   11 | return 0;
      | ^~~~~~
a.cc:12:1: error: expected declaration before '}' token
   12 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
  
int main(){
for( int x, t = 1; ; t++ ){
cint >> x;
if ( x == 0 ) break;
cout << "Case " << t << ": " << x << endl;
}
 
return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:1: error: 'cint' was not declared in this scope; did you mean 'uint'?
    6 | cint >> x;
      | ^~~~
      | uint
Language: C++

#include<iostream>
using namespace std;
   
int main(){
for ( int x, t = 1; ; t++ ){
cint >> x;
if ( x == 0 ) break;
cout << "Case " << t << ": " << x << endl;
}
  
return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:1: error: 'cint' was not declared in this scope; did you mean 'uint'?
    6 | cint >> x;
      | ^~~~
      | uint
Language: C++

#include <stdio.h>

int main(){

  int i = 0;
  int a[];

  while()

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: storage size of 'a' isn't known
    6 |   int a[];
      |       ^
a.cc:8:9: error: expected primary-expression before ')' token
    8 |   while()
      |         ^
Language: C++

#include <stdio.h>

int main(){

  int i;
  int a;

  for(i = 0; ; i++)){
    scanf("%d", &a);
    if(a == 0){
      break;
    }
    printf("Case %d: %d\n",i, a);
  }

  return 0;
}

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

#include <stdio.h>

int main(){

  int i;
  int a;

  for(i = 0; 1; i++)){
    scanf("%d", &a);
    if(a == 0){
      break;
    }
    printf("Case %d: %d\n",i, a);
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: expected primary-expression before ')' token
    8 |   for(i = 0; 1; i++)){
      |                     ^
Language: C++

include <iostream>
#include <stdio.h>

int main() {
    int i = 0;
    int num;
    std::cin >> num;
    while (num) {
        std::cout << "Case " << ++i << ": " << num << std::endl;
        std::cin >> num;
    }

    return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:10: error: 'cin' is not a member of 'std'
    7 |     std::cin >> num;
      |          ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <stdio.h>
  +++ |+#include <iostream>
    3 | 
a.cc:9:14: error: 'cout' is not a member of 'std'
    9 |         std::cout << "Case " << ++i << ": " << num << std::endl;
      |              ^~~~
a.cc:9:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:60: error: 'endl' is not a member of 'std'
    9 |         std::cout << "Case " << ++i << ": " << num << std::endl;
      |                                                            ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <stdio.h>
  +++ |+#include <ostream>
    3 | 
a.cc:10:14: error: 'cin' is not a member of 'std'
   10 |         std::cin >> num;
      |              ^~~
a.cc:10:14: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <iostream>
using namespace std;
int arr[100000]={0};
int main(){
	int i=0 , n;
	while(1){
		cin>> n;
		if (!n) break;
		a[i++]=n;
	}
	for(int j=0 ; a[j]!=0 ; j++)
		cout << "Case i:" << a[j] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'a' was not declared in this scope
    9 |                 a[i++]=n;
      |                 ^
a.cc:11:23: error: 'a' was not declared in this scope
   11 |         for(int j=0 ; a[j]!=0 ; j++)
      |                       ^
a.cc: At global scope:
a.cc:14:9: error: expected unqualified-id before 'return'
   14 |         return 0;
      |         ^~~~~~
a.cc:15:1: error: expected declaration before '}' token
   15 | }
      | ^
Language: C++

#include <iostream>
using namespace std;
int arr[100000]={0};
int main(){
	int i=0 , n;
	while(1){
		cin>> n;
		if (!n) break;
		a[i++]=n;
	}
	for(int j=0 ; a[j]!=0 ; j++){
		cout << "Case i:" << a[j] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'a' was not declared in this scope
    9 |                 a[i++]=n;
      |                 ^
a.cc:11:23: error: 'a' was not declared in this scope
   11 |         for(int j=0 ; a[j]!=0 ; j++){
      |                       ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int n,i=1;
  while(1){
    cin >> n;
    if(n == 0) break;
    cout << "Case " << i << " : " << n << endl;
    i++
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: expected ';' before '}' token
   10 |     i++
      |        ^
      |        ;
   11 |   }
      |   ~
Language: C++

#include<cstdio>
main(){
 int x,i=1;
 while(1){
 scanf("%d",&x);
 if(x==0)break;
 else printf("Case %d: %d\n",i,x);
 i++
 }
}

Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:8:5: error: expected ';' before '}' token
    8 |  i++
      |     ^
      |     ;
    9 |  }
      |  ~
Language: C++

#include <iostream>

int main(){
    int num;
    int cnt=1;
    while(1){
       cin >>num;
       std::cout <<"Case "<< cnt << ": " << num << std::endl; ;
        cnt++;
        if(num ==0 ) break;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |        cin >>num;
      |        ^~~
      |        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
      |                  ^~~
Language: C++

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

public class Main {

    public static void main(String[] args) {
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String line = br.readLine();
            int count = 0;
            
            while(line.equals("0") == false){
            	System.out.println("Case "+ ++count + ": " +line);
                line = br.readLine();
            }
            br.close();
        } catch (IOException e) {
            System.err.println(e);
        }
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.BufferedReader;
      | ^~~~~~
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 java.io.IOException;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.io.InputStreamReader;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: expected unqualified-id before 'public'
    5 | public class Main {
      | ^~~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
    int a;
    cin >> a;
    if(int i = 1; ;++i){
       cout <<"Case " << i << ": " << a;
       }
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: expected primary-expression before ';' token
    7 |     if(int i = 1; ;++i){
      |                   ^
a.cc:7:18: error: expected ')' before ';' token
    7 |     if(int i = 1; ;++i){
      |       ~          ^~
      |                  )
a.cc:7:22: error: 'i' was not declared in this scope
    7 |     if(int i = 1; ;++i){
      |                      ^
Language: C++

#include<iostream>
using namespace std;

int main(){
    int a;
    cin >> a;
    if(int i = 1; ;++i){
       if(a = 0) break;
       cout <<"Case " << i << ": " << a;
       }
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: expected primary-expression before ';' token
    7 |     if(int i = 1; ;++i){
      |                   ^
a.cc:7:18: error: expected ')' before ';' token
    7 |     if(int i = 1; ;++i){
      |       ~          ^~
      |                  )
a.cc:7:22: error: 'i' was not declared in this scope
    7 |     if(int i = 1; ;++i){
      |                      ^
Language: C++

#include<iostream>
using namespace std;

int main(){
    int a;
    cin >> a;
    for(i = 1; ;++i){
        if(a = 0)break;
        cout << "Case " << i << ": " << a;
       }
      return 0;
     }

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

#include<iostream>
using namespace std;

int main(){
    int a;
    cin >> a;
    for(i = 1; ;++i){
        if(a = 0)break;
        cout << "Case " << i << ": " << a;
       }
     }

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

#include<iostream>
using namespace std;

int main(){
    for(int x,int t = 1; ;++i){
       cin >> x;
       if(x == 0)break;
       cout << "Case " << t << ": " << x << endl;
     }
    retrun 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:5:15: error: expected unqualified-id before 'int'
    5 |     for(int x,int t = 1; ;++i){
      |               ^~~
a.cc:5:15: error: expected ';' before 'int'
    5 |     for(int x,int t = 1; ;++i){
      |               ^~~
      |               ;
a.cc:5:26: error: expected primary-expression before ';' token
    5 |     for(int x,int t = 1; ;++i){
      |                          ^
a.cc:5:25: error: expected ')' before ';' token
    5 |     for(int x,int t = 1; ;++i){
      |        ~                ^~
      |                         )
a.cc:5:29: error: 'i' was not declared in this scope
    5 |     for(int x,int t = 1; ;++i){
      |                             ^
a.cc:10:5: error: 'retrun' was not declared in this scope
   10 |     retrun 0;
      |     ^~~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
    for(int x, t = 1; ;++i){
       cin >> x;
       if(x == 0) break;
       cout << "Case " << t << ": " << x << endl;
     }
    retrun 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:5:26: error: 'i' was not declared in this scope
    5 |     for(int x, t = 1; ;++i){
      |                          ^
a.cc:10:5: error: 'retrun' was not declared in this scope
   10 |     retrun 0;
      |     ^~~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
    for(int x, t = 1; ;++i){
       cin >> x;
       if(x == 0) break;
       cout << "Case " << t << ": " << x << endl;
     }
    return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:5:26: error: 'i' was not declared in this scope
    5 |     for(int x, t = 1; ;++i){
      |                          ^
Language: C++

#include<iostream>
using namespace std;

int main(){
    for(int x,int t = 1; ;++i){
       cin >> x;
       if(x == 0)break;
       cout << "Case " << t << ": " << x << endl;
     }
    return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:5:15: error: expected unqualified-id before 'int'
    5 |     for(int x,int t = 1; ;++i){
      |               ^~~
a.cc:5:15: error: expected ';' before 'int'
    5 |     for(int x,int t = 1; ;++i){
      |               ^~~
      |               ;
a.cc:5:26: error: expected primary-expression before ';' token
    5 |     for(int x,int t = 1; ;++i){
      |                          ^
a.cc:5:25: error: expected ')' before ';' token
    5 |     for(int x,int t = 1; ;++i){
      |        ~                ^~
      |                         )
a.cc:5:29: error: 'i' was not declared in this scope
    5 |     for(int x,int t = 1; ;++i){
      |                             ^
Language: C++

#include <iostream>
using namespace std;

int main(){
	int x, counter=1;
	while(x!=0){
		cin >> x;
		cout << "Case " << i << ": " << x << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:36: error: 'i' was not declared in this scope
    8 |                 cout << "Case " << i << ": " << x << endl;
      |                                    ^
Language: C++

#include <iostream>
using namespace std;

int jain(){
	int x, counter=1;
	while(x!=0){
		cin >> x;
		cout << "Case " << counter << ": " << x << endl;
	}
	return 0;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
using namespace std;

int main(){

while(1){
cin>>n;
if(x==0) break;
for(int i=0;i<n;i++){cout<<"case"<<" "<<i<<n<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: 'n' was not declared in this scope
    7 | cin>>n;
      |      ^
a.cc:8:4: error: 'x' was not declared in this scope
    8 | if(x==0) break;
      |    ^
a.cc:11:2: error: expected '}' at end of input
   11 | }
      |  ^
a.cc:6:9: note: to match this '{'
    6 | while(1){
      |         ^
a.cc:11:2: error: expected '}' at end of input
   11 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;

int main(){
for(int x;t=1;t++){
cin>>x;
if(x=0) break;
cout<<"case"<<t<<" "<<x<<endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:11: error: 't' was not declared in this scope
    5 | for(int x;t=1;t++){
      |           ^
Language: C++

#include<iostream>
using namespace std;

int main(){
for(int x;t=1;t++){
cin>>x;
if(x=0) break;
cout<<"case"<<t<<":"<<x<<endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:11: error: 't' was not declared in this scope
    5 | for(int x;t=1;t++){
      |           ^
Language: C++

#include<iostream>
using namespace std;

int main(){
for(int x,t=1;;t++){
cin>>x;
if(x==0) break;
cout<<"case"<<t<<:<<x<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: expected primary-expression before ':' token
    8 | cout<<"case"<<t<<:<<x<<endl;
      |                  ^
a.cc:10:2: error: expected '}' at end of input
   10 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;

int main(){
for(int x,t=1;;t++){
cin>>x;
if(x==0) break;
cout<<"case"<<t<<":"<<x<<endl;
return 0;
}

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

#include <iostream>
using namespace std;

int main() {
	int k = 1;
	while(1){
	int a;
	cin >> a;
	if(a== 0){break}
	cout <<"Case "<<k<<" "<<a<<endl;
	k++;
	}	
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: expected ';' before '}' token
    9 |         if(a== 0){break}
      |                        ^
      |                        ;
Language: C++

#include<iostream>
using namespace std;

int main(){
	int x ;
	
	while(int i=1;i+1){
    
	cin>>x;	
	
	if(x==0){break;}
	cout<< "Case"<<" "<<i:<<" "<<x<< endl ;
	}
	
	return 0; 
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: expected ')' before ';' token
    7 |         while(int i=1;i+1){
      |              ~       ^
      |                      )
a.cc:7:23: error: 'i' was not declared in this scope
    7 |         while(int i=1;i+1){
      |                       ^
Language: C++

#include<iostream>
using namespace std;

int main(){
	int x ;
	cin >> x ;
	
	while(x>=0){
    i+1	;
	
	if(x==0){break;}
	cout<< "Case"<<" "<<i:<<" "<<x<< endl ;
	}
	
	return 0; 
	}

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

#include<iostream>
using namespace std;

int main(){
	int x ;
	
	while(1){
    int i=0;i++
	cin >> x ;
	if(x==0){break;}
	cout<< "Case"<<" "<<i<<":"<<x<< endl ;
	}
	
	return 0; 
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before 'cin'
    8 |     int i=0;i++
      |                ^
      |                ;
    9 |         cin >> x ;
      |         ~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
	int x ,i;
	i=0;
	while(1){
    cin >> x ;
	if(x==0){break;}
	1+= 1 ;
	cout<<"Case"<<" "<<i<<":"<<" "<<x<< endl ;
	}
	
	return 0; 
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: lvalue required as left operand of assignment
   10 |         1+= 1 ;
      |             ^
Language: C++

#include<stdio.h>

int main(){

	int i = 0, a[100000], j;a

	while (1){
		scanf("%d", &a[i]);
		if(a[i] == 0){
			break;
		}
		i++;
	}

	for(j = 0; j < i; j++){
		printf("Case %d; %d\n", j + 1, a[j]);
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:34: error: expected ';' before 'while'
    5 |         int i = 0, a[100000], j;a
      |                                  ^
      |                                  ;
    6 | 
    7 |         while (1){
      |         ~~~~~
Language: C++

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

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????



		BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<Integer> list = new ArrayList<Integer>();

		Boolean isContinue = true;

		while(isContinue){

			int intNum = 0;
			try {

				String strIn = insBR.readLine();
				intNum = Integer.parseInt(strIn);

				if(intNum != 0 ){
					list.add(intNum);

				}else{
					isContinue = false;
				}

			}catch(IOException e){
				System.out.println(e);

			}catch(NumberFormatException e){
				System.out.println(e);
			}


		}

		for(int i = 0; i < list.size(); i++){

			System.out.print("Case " + (i + 1) + ": ");
			System.out.println(list.get(i));
		}
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.BufferedReader;
      | ^~~~~~
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 java.io.IOException;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.io.InputStreamReader;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.util.ArrayList;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: expected unqualified-id before 'public'
    6 | public class Main {
      | ^~~~~~
Language: C++

n = 1
while True:
    x = int(input())
    if x == 0: break
    print('Case {}: {}'.format(n, x))
    n += 1

Compiler output:
a.cc:5:11: warning: multi-character literal with 11 characters exceeds 'int' size of 4 bytes
    5 |     print('Case {}: {}'.format(n, x))
      |           ^~~~~~~~~~~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n = 1
      | ^
Language: C++

#include <iostream>

int main(){

int x;

 for (i=1; x=0; i++){
 std::cin >> x;
 std::cout << "Case " << i << ": " << x << std::endl;
 }
}

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

#include <iostream>

int main(){

int x;

 for (i=1; i; i++){
 std::cin >> x;
 if(x=0){ return 0;}
 std::cout << "Case " << i << ": " << x << std::endl;
 }
}

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

#include <iostream>

int main()
{
    int x;
    for(int i=1;;i++){
        cin>>x;
        if(x==0)break;
        std::cout<<"Case "<<i<<": "<<x<<std::endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |         cin>>x;
      |         ^~~
      |         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
      |                  ^~~
Language: C++

#include <iostream>
#include <vector>
int main(){
int a=0;
std::vector<int> v(0);
while(true){
a++;
v size(a);
std::cin>>v[a-1];
if(v[a-1]==0){
break;
}
}
for(int i=0;i<a-1;i++){
std::cout<<"Case 1: "<<v[i]<<std::endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:2: error: expected ';' before 'size'
    8 | v size(a);
      |  ^~~~~
      |  ;