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

#include <iostream>
#include <cstdio>

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: expected unqualified-id before numeric constant
   13 |     for(int 1; i <= count; i++){
      |             ^
a.cc:13:12: error: expected ';' before numeric constant
   13 |     for(int 1; i <= count; i++){
      |            ^~
      |            ;
a.cc:13:16: error: 'i' was not declared in this scope
   13 |     for(int 1; i <= count; i++){
      |                ^
a.cc:13:26: error: expected ')' before ';' token
   13 |     for(int 1; i <= count; i++){
      |        ~                 ^
      |                          )
a.cc:13:28: error: 'i' was not declared in this scope
   13 |     for(int 1; i <= count; i++){
      |                            ^
Language: C++

#include <cstdio>

int main(){
    int x[10000], buf, count;
    count = 0
    do{
        scanf("%d", &buf);
        x[count] = buf;
        count++;
    }while(buf == 0)
    for(int i = 1; i <= count; i++){
        printf("Case %d: %d \n", i, x[i - 1]);
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:14: error: expected ';' before 'do'
    5 |     count = 0
      |              ^
      |              ;
    6 |     do{
      |     ~~
Language: C++

#include <cstdio>

int main(){
    int x[10000], buf, count;
    count = 0;
    do{
        scanf("%d", &buf);
        x[count] = buf;
        count++;
    }while(buf == 0)
    for(int i = 1; i <= count; i++){
        printf("Case %d: %d \n", i, x[i - 1]);
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: expected ';' before 'for'
   10 |     }while(buf == 0)
      |                     ^
      |                     ;
   11 |     for(int i = 1; i <= count; i++){
      |     ~~~
Language: C++

#include <stdio.h>

int main() {
        int i = 1;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:30: error: 'x' was not declared in this scope
    7 |                 scanf("%d", &x);
      |                              ^
Language: C++

#include<iostream>

int main(){
   int x[], i;
   for(i = 0; i < 10000; i++) {
       std::cin >> x[i];
       if(!(1 <= x <= 10000)) return 0;
       if(x[i] == 0) break;
       std::cout << std::endl;
   }

    for(int j = 1; j <= i + 1; j++) {
        std::cout << "Case" << " " << j << ":" << x[j] << std::endl;
    }

    return 0;
   
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:8: error: storage size of 'x' isn't known
    4 |    int x[], i;
      |        ^
Language: C++

#include<iostream>

int main(){
   int x[], i;
   for(i = 0; i < 10000; i++) {
       std::cin >> x[i];
       if(!(1 <= x <= 10000)) return 0;
       if(x[i] == 0) break;
       std::cout << std::endl;
   }

    for(int j = 1; j <= (i + 1); j++) {
        std::cout << "Case" << " " << j << ":" << x[j] << std::endl;
    }

    return 0;
   
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:8: error: storage size of 'x' isn't known
    4 |    int x[], i;
      |        ^
Language: C++

#include<iostream>

int main(){
   int x[], i;
   for(i = 0; i < 10000; i++) {
       std::cin >> x[i];
       if(!(1 <= x[i] <= 10000)) return 0;
       if(x[i] == 0) break;
       std::cout << std::endl;
   }

    for(int j = 1; j <= (i + 1); j++) {
        std::cout << "Case" << " " << j << ":" << x[j] << std::endl;
    }

    return 0;
   
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:8: error: storage size of 'x' isn't known
    4 |    int x[], i;
      |        ^
Language: C++

#include<iostream>

int main(){
   int x[], i;
   for(i = 0; i < 10000; i++) {
       std::cin >> x[i];
       if(!(1 <= x[i] <= 10000)) return 0;
       if(x[i] == 0) break;
       std::cout << "¥n" << std::endl;
   }

    for(int j = 1; j <= (i + 1); j++) {
        std::cout << "Case" << " " << j << ":" << x[j] << std::endl;
    }

    return 0;
   
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:8: error: storage size of 'x' isn't known
    4 |    int x[], i;
      |        ^
Language: C++

#include<iostream>

int main(){
   int x[];
   int i;
   for(i = 0; i < 10000; i++) {
       std::cin >> x[i];
       if(!(1 <= x[i] <= 10000)) return 0;
       if(x[i] == 0) break;
       std::cout << "¥n" << std::endl;
   }

    for(int j = 1; j <= (i + 1); j++) {
        std::cout << "Case" << " " << j << ":" << x[j] << std::endl;
    }

    return 0;
   
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:8: error: storage size of 'x' isn't known
    4 |    int x[];
      |        ^
Language: C++

#include<iostream>

int main(){
   int x[];
   int i;
   for(i = 0; i < 10000; i++) {
       std::cin >> x[i];
       if(!(1 <= x[i] <= 10000)) return 0;
       if(x[i] == 0) break;
       std::cout << "¥n" << std::endl;
   };

    for(int j = 1; j <= (i + 1); j++) {
        std::cout << "Case" << " " << j << ":" << x[j] << std::endl;
    };

    return 0;
   
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:8: error: storage size of 'x' isn't known
    4 |    int x[];
      |        ^
Language: C++

#include <iostream>

using namespace std;

int main()

{
    int x,i;

    cin>>x;
if(x=0)
break;

    while(i<10000)
    {
cout<<"Case "<<i++<<": "<<x<<endl;
i++}

       
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:12:1: error: break statement not within loop or switch
   12 | break;
      | ^~~~~
a.cc:17:4: error: expected ';' before '}' token
   17 | i++}
      |    ^
      |    ;
Language: C++

#include <iostream>

using namespace std;

int main()

{
    int x,i;

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

       
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:12:1: error: break statement not within loop or switch
   12 | break;
      | ^~~~~
a.cc:17:4: error: expected ';' before '}' token
   17 | i++}}
      |    ^
      |    ;
Language: C++

#include <stdio.h>

int main(void){
 int x;
 while(1){
  scanf("%d\n", $x);
  if(x != 0){
   printf("%d", x);
  }else{
   break;
  }
 }
 return 0;
}


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

#include <stdio.h>

int main(void){
 int x;
 int y=0;
 while(1){
  scanf("%d\n", $x);
  if(x != 0){
   y++;
   printf("case%d:%d", y, x);
  }else{
   break;
  }
 }
 return 0;
}



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

#include <stdio.h>

int main(void){
 int x;
 int y=0;
 while(1){
  scanf("%d\n", $x);
  if(x != 0){
   y=y+1;
   printf("case%d:%d", y, x);
  }else{
   break;
  }
 }
 return 0;
}



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

#include <stdio.h>

int main(void){
 int x;
 int y=0;
 while(1){
  scanf("%d\n", $x);
  if(x == 0){
   break;
   y=y+1;
   printf("case%d:%d", y, x);
  }
 }
 return 0;
}



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

#include <stdio.h>

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



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

#include <stdio.h>

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



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

#include<iostream>
using namespace std;

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

return 0;

}



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

#include <iostream>
using namespace std;
int main(void){
    // Your code here!
    for(int x; a = 1; ; a++ ){
        cin >> x;
        if( x == 0 )break;
        cout << "Case " << a << ";" << " " << x <<endl;
    }
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: 'a' was not declared in this scope
    5 |     for(int x; a = 1; ; a++ ){
      |                ^
a.cc:5:23: error: expected primary-expression before ';' token
    5 |     for(int x; a = 1; ; a++ ){
      |                       ^
a.cc:5:22: error: expected ')' before ';' token
    5 |     for(int x; a = 1; ; a++ ){
      |        ~             ^~
      |                      )
a.cc:5:25: error: 'a' was not declared in this scope
    5 |     for(int x; a = 1; ; a++ ){
      |                         ^
Language: C++

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



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

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



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



#include <stdio.h>
#include <stdlib.h>
 
int main()
{
    int i, x;
    char buf[100];
 
    for (i = 1; ; i++) {
        gets(buf);
        x = atoi(buf);
        if (x == 0) break;
        printf("Case %d: %d\n", i, x);
    }
    return 0;
}
 




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

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


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

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


Compiler output:
a.cc:8:1: error: extended character 　 is not valid in an identifier
    8 | 　　while (1){
      | ^
a.cc:8:1: error: extended character 　 is not valid in an identifier
a.cc:9:1: error: extended character 　 is not valid in an identifier
    9 | 　　    int x;
      | ^
a.cc:9:1: error: extended character 　 is not valid in an identifier
a.cc:10:1: error: extended character 　 is not valid in an identifier
   10 | 　　    cin >> x;
      | ^
a.cc:10:1: error: extended character 　 is not valid in an identifier
a.cc:11:1: error: extended character 　 is not valid in an identifier
   11 | 　　    cout<< "Case " << i << ": " << x << endl;
      | ^
a.cc:11:1: error: extended character 　 is not valid in an identifier
a.cc:12:1: error: extended character 　 is not valid in an identifier
   12 | 　　    if (x == 0){
      | ^
a.cc:12:1: error: extended character 　 is not valid in an identifier
a.cc:13:1: error: extended character 　 is not valid in an identifier
   13 | 　　        break;
      | ^
a.cc:13:1: error: extended character 　 is not valid in an identifier
a.cc:14:1: error: extended character 　 is not valid in an identifier
   14 | 　　    }else{
      | ^
a.cc:14:1: error: extended character 　 is not valid in an identifier
a.cc:15:1: error: extended character 　 is not valid in an identifier
   15 | 　　        i++ ;
      | ^
a.cc:15:1: error: extended character 　 is not valid in an identifier
a.cc:16:1: error: extended character 　 is not valid in an identifier
   16 | 　　
      | ^
a.cc:16:1: error: extended character 　 is not valid in an identifier
a.cc:17:1: error: extended character 　 is not valid in an identifier
   17 | 　　    }
      | ^
a.cc:17:1: error: extended character 　 is not valid in an identifier
a.cc:18:1: error: extended character 　 is not valid in an identifier
   18 | 　　}
      | ^
a.cc:18:1: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:7:5: error: expected initializer before 'i'
    7 |     i == 1
      |     ^
Language: C++

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


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

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

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


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

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

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


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

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

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


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

#include<iostream>
using namespace std;
int main(){
int a = 1;
int b = 1;

while(a != 0){
cin >> a;
if (a != 0){
cout << "Case " << b << ": " << a << endl;
 b++;
}
return 0;
}


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

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



int main() {
	
	for (int i = 1, int num;;i++) {
		std::cin >> num;

		if (num == 0)break;

		printf("Case %d: %d\n", i, num);
	}



//	system("pause");
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:25: error: expected unqualified-id before 'int'
   10 |         for (int i = 1, int num;;i++) {
      |                         ^~~
a.cc:10:24: error: expected ';' before 'int'
   10 |         for (int i = 1, int num;;i++) {
      |                        ^~~~
      |                        ;
a.cc:10:32: error: expected initializer before ';' token
   10 |         for (int i = 1, int num;;i++) {
      |                                ^
a.cc:10:33: error: expected primary-expression before ';' token
   10 |         for (int i = 1, int num;;i++) {
      |                                 ^
a.cc:10:33: error: expected ')' before ';' token
   10 |         for (int i = 1, int num;;i++) {
      |             ~                   ^
      |                                 )
a.cc:10:34: error: 'i' was not declared in this scope
   10 |         for (int i = 1, int num;;i++) {
      |                                  ^
Language: C++

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

int main() {
  int x;
  cin >> x;
  while (true) {
    cout << "case" << i << ":" << x;
    if (x == 0) break;
  }
}


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

#include <iostream>
using namespace std;


int main(void){


int test [1000];


    for(int i = 0; i <= 1000; i++){

       cin >> test[i];
       
      
       if(test[i] == 0){
           
           test[i - 1];
           break;
            
       }
       cout << "Case" << " " << i  <<" : " << test[i] << std::endl;
    }


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

#include <iostream>
using namespace std;


int main(void){


int test [1000];


    for(int i = 0; i < 1000; i++){

       cin >> test[i];
       
      
       if(test[i] == 0){
           
           test[i - 1];
           break;
            
       }
       cout << "Case" << " " << i  <<" : " << test[i] << std::endl;
    }


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

#include <iostream>

using namespace std;

int main() {

	int in;
	int i = 1;
	
	while (cin >> in && in != 0) {
		cout << "Case " << i << ':' << x << endl;
		i++;
	}

	return 0;
}


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

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

int main (){
 vector<int> x;
 int i;
 while(x.at(i)!=0){
  cin >> x.at(i);
  i++:}
 for(int j=0; j<i; j++){
  cout << "Case " << j+1 << ": " << x.at(j) << endl;
 }
}
 


 


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

#include<iostream>
using namespace std;

int main(){

	while(1){
		int x, i = 1;
		cin >> x;

		if(x == 0) break;

		cout << "Case " << i << ": " << x　<< endl;

		i++;
	}

	return 0;
}


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

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

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


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

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




Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:4: error: expected ';' before 'cin'
    5 | y=1
      |    ^
      |    ;
    6 | cin>>x
      | ~~~
Language: C++

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



Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:4: error: expected ';' before 'cin'
    5 | y=1
      |    ^
      |    ;
    6 | cin>>x
      | ~~~
Language: C++

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



Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope
    5 | cin>>x
      | ^~~
Language: C++

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



Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope
    5 | cin>>x
      | ^~~
Language: C++

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



Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope
    5 | cin>>x
      | ^~~
Language: C++

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



Compiler output:
a.cc:1:25: warning: extra tokens at end of #include directive
    1 | #include<iostream>using namespace std;int main(){int x,y;cin>>x;y=0;while(1){y++;if(x==0){break;}
      |                         ^~~~~~~~~
a.cc:1:9: fatal error: iostream>usin: No such file or directory
    1 | #include<iostream>using namespace std;int main(){int x,y;cin>>x;y=0;while(1){y++;if(x==0){break;}
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

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



Compiler output:
a.cc: In function 'int main()':
a.cc:10:4: error: 'return0' was not declared in this scope
   10 |    return0
      |    ^~~~~~~
Language: C++

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



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

#include<bits/stdc++.h>
 
using namespace std;
 
int main()
{
int i = 1;
while(1)
{
int x;
scanf(x,%d);
if(x == 0) break;
printf("Case %d: %d\n",x,i);
i += 1;
}
return 0;
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: expected primary-expression before '%' token
   11 | scanf(x,%d);
      |         ^
a.cc:11:10: error: 'd' was not declared in this scope
   11 | scanf(x,%d);
      |          ^
Language: C++

#include<bits/stdc++.h>
 
using namespace std;
 
int main()
{
int i = 1;
while(1)
{
int x;
scanf(x,&d);
if(x == 0) break;
printf("Case %d: %d\n",x,i);
i += 1;
}
return 0;
} 


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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:21: error: expected initializer before '!=' token
    5 |         while(int i != 0){
      |                     ^~
a.cc:5:20: error: expected ')' before '!=' token
    5 |         while(int i != 0){
      |              ~     ^~~
      |                    )
a.cc:5:21: error: expected primary-expression before '!=' token
    5 |         while(int i != 0){
      |                     ^~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:55: error: 'ednl' was not declared in this scope
   10 |                 cout <<  "Case " << i << ":=" << n << ednl;
      |                                                       ^~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:55: error: 'ednl' was not declared in this scope
   10 |                 cout <<  "Case " << i << ": " << n << ednl;
      |                                                       ^~~~
Language: C++

#include <stdio.h>

int main()
{
	int count = 0;
	while (1)
	{
		int a = 0;
		scanf_s("%d", &a);
		if (a == 0){break;}

		printf("Case %d: %d\n", count, a);
	}
	return 0;
}


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

includee<iostream>
using namespace std;
int main(){
int x,y=1;
while(1){
cin>>x;
if(x==0)break;
cout<<"Case "<<y<<": "<<x<<endl;
}
}



Compiler output:
a.cc:1:1: error: 'includee' does not name a type
    1 | includee<iostream>
      | ^~~~~~~~
a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope
    6 | cin>>x;
      | ^~~
a.cc:8:1: error: 'cout' was not declared in this scope
    8 | cout<<"Case "<<y<<": "<<x<<endl;
      | ^~~~
a.cc:8:28: error: 'endl' was not declared in this scope
    8 | cout<<"Case "<<y<<": "<<x<<endl;
      |                            ^~~~
Language: C++

#includee<iostream>
using namespace std;
int main(){
int x,y=1;
while(1){
cin>>x;
if(x==0)break;
cout<<"Case "<<y<<": "<<x<<endl;
}
}



Compiler output:
a.cc:1:2: error: invalid preprocessing directive #includee; did you mean #include?
    1 | #includee<iostream>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope
    6 | 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 | #includee<iostream>
a.cc:8:1: error: 'cout' was not declared in this scope
    8 | cout<<"Case "<<y<<": "<<x<<endl;
      | ^~~~
a.cc:8:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:28: error: 'endl' was not declared in this scope
    8 | cout<<"Case "<<y<<": "<<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 | #includee<iostream>
Language: C++

#include<iostream>
using namespace std;

int main(){
	int x,c;
	c=0;
	while(1){
		cin >> x
		if ( x == 0 ) break;
		
		c++;		
		printf("Case %d: %d\n",c,x);
	}
	return 0;
}

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

int main() {

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

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

#include <iostream>
using namespace std;

int main(void){

    int a, i=1;

    while (cin >> a, a != 0)
        cout << "Case " << i++ << ": "<< a << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:9:52: error: expected '}' at end of input
    9 |         cout << "Case " << i++ << ": "<< a << endl;
      |                                                    ^
a.cc:4:15: note: to match this '{'
    4 | int main(void){
      |               ^
Language: C++

#include<iostream>
using namespace std;

int main(){
	int x,i = 1;
	cin >> x
	if (x == 0)break;
	cout << "Case" << "i" << ":" << x << "\n"

	return 0;
}	

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: expected ';' before 'if'
    6 |         cin >> x
      |                 ^
      |                 ;
    7 |         if (x == 0)break;
      |         ~~       
a.cc:8:50: error: expected ';' before 'return'
    8 |         cout << "Case" << "i" << ":" << x << "\n"
      |                                                  ^
      |                                                  ;
    9 | 
   10 |         return 0;
      |         ~~~~~~
Language: C++

#include<iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: expected ';' before 'if'
    7 |         cin >> x
      |                 ^
      |                 ;
    8 |         if (x == 0)break;
      |         ~~       
a.cc:9:50: error: expected ';' before '}' token
    9 |         cout << "Case" << "i" << ":" << x << "\n"
      |                                                  ^
      |                                                  ;
   10 |         }
      |         ~
Language: C++

#include<iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:50: error: expected ';' before '}' token
    9 |         cout << "Case" << "i" << ":" << x << "\n"
      |                                                  ^
      |                                                  ;
   10 |         }
      |         ~
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:1: error: 'else' without a previous 'if'
   12 | else {break;}
      | ^~~~
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:1: error: 'else' without a previous 'if'
   12 | else break;
      | ^~~~
Language: C++

#include <iostream>
using namespace std;

int main(void) {
	int a=1, b;
        while (1) {
cin >> b ;          
if (b != 0) {
cout << "Case " << a << ": " << b << endl;
a= a+1;
};
else break;
};
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:1: error: 'else' without a previous 'if'
   12 | else break;
      | ^~~~
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:1: error: 'else' without a previous 'if'
   12 | else {break;
      | ^~~~
Language: C++

#include<iostream>
using namespace std;

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

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

#include<iostream>
using namespace std;

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

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

#include<iostream>
using namespace std;

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

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

import java.io.*;

public class Main {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		 BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		 Integer case_num = 1;
		 while(true){
			 String input = in.readLine();
			 if(input == "0"){
				 break;
			 }
			 if(input == null){
				 break;
			 }
			 System.out.println("Case " + case_num + ": " + input);
			 case_num += 1;
		 }
	}

}

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

#include <stdio.h>

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

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

#include <iostream>
#include <string>
#include <iomanip>
#include <cstring>
#define _CRT_SECURE_NO_WARNINGS
using namespace std;

int swap(int &a,int &b){
	int c;
	c=a;
	a=b;
	b=c;

	return 0;
}



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

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

#include <iostream>
using namespace std;

int main(){
  int x;

  cin >> x;
  while (X != 0){
    cout << x << "\n";
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 'X' was not declared in this scope
    8 |   while (X != 0){
      |          ^
Language: C++

`#include<iostream>
using namespace std;

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

    cin >> x;
     
    if(x == 0) break;
    
    else 
      i++;
    cout <<"Case " << i << ":" << x <<"\n";
  }
  return 0; 
}

Compiler output:
a.cc:1:1: error: stray '`' in program
    1 | `#include<iostream>
      | ^
a.cc:1:2: error: stray '#' in program
    1 | `#include<iostream>
      |  ^
a.cc:1:3: error: 'include' does not name a type
    1 | `#include<iostream>
      |   ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
    8 |     cin >> x;
      |     ^~~
a.cc:14:5: error: 'cout' was not declared in this scope
   14 |     cout <<"Case " << i << ":" << x <<"\n";
      |     ^~~~
Language: C++

#include <iostream>

using namespace std;
main{

 int i=1,num;

 while(1){


  cin >> num;

  if(num){

   cout << "Case " << i << " : " << num << endl;

  }else{

   break;

  }
  i++;

 }

}

Compiler output:
a.cc:4:1: error: 'main' does not name a type
    4 | main{
      | ^~~~
Language: C++

#include <iostream>

using namespace std;

main(){

int x,count=0;

while(1){

count++;

cin >> x;
if(x!=0){
cout << "Case " << count << ": " << x; 
}else
break;

}

return;

}

Compiler output:
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:21:1: error: return-statement with no value, in function returning 'int' [-fpermissive]
   21 | return;
      | ^~~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
	for(int i=0; ; i++;){
	int x;
	if(x==0){break;}
	else{ 
	cout << "Cace " << "i" << ":" << x << "\n";}
	}
	return 0;
	}

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

#include<iostream>
using namespace std;

int main(){
	for(int i=1; ; i++;){
	int x;
	if(x==0){break;}
	else{ 
	cout << "Cace " << "i" << ":" << x << "\n";}
	}
	return 0;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:27: error: expected ')' before ';' token
    5 |         for(int i=1; ; i++;){
      |            ~              ^
      |                           )
a.cc:5:28: error: expected primary-expression before ')' token
    5 |         for(int i=1; ; i++;){
      |                            ^
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int num1,num2 = 1;
    while ((num1=sc.nextInt()) != 0 && (num2=sc.nextInt()) != 0){
      System.out.println(num1+" "+num2);
      num++;
    }
  }
}



Compiler output:
Main.java:8: error: cannot find symbol
      num++;
      ^
  symbol:   variable num
  location: class Main
1 error
Language: Java

/* ITP1_3_C */

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

public class Main {
  public static void main (String[] args) throws java.lang.Exception {
    // 入力された値をゲット
   Scanner sc = new Scanner(System.in);

   // 入力データがなくなるまで繰り返す
   while (sc.hasNext()) {
     int x = sc.nextInt();  // 1個目をxにセット
     int y = sc.nextInt();  // 1個目をyにセット

     if((x = 0) && (y = 0)) {
        // 処理をぬける
        break;
     } else {
       if(x < y) {
           System.out.println(x + " " + y);
       } else {
           System.out.println(y + " " + x);
       }
     }
   }
 }
}


Compiler output:
Main.java:16: error: bad operand types for binary operator '&&'
     if((x = 0) && (y = 0)) {
                ^
  first type:  int
  second type: int
1 error
Language: Java

/* ITP1_3_C */

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

public class Main {
  public static void main (String[] args) throws java.lang.Exception {
    // 入力された値をゲット
   Scanner sc = new Scanner(System.in);

   // 入力データがなくなるまで繰り返す
   while (sc.hasNext()) {
     int x = sc.nextInt();  // 1個目をxにセット
     int y = sc.nextInt();  // 1個目をyにセット

     if(x = 0 && y = 0) {
        // 処理をぬける
        break;
     } else {
       if(x < y) {
           System.out.println(x + " " + y);
       } else {
           System.out.println(y + " " + x);
       }
     }
   }
 }
}



Compiler output:
Main.java:16: error: bad operand types for binary operator '&&'
     if(x = 0 && y = 0) {
              ^
  first type:  int
  second type: int
Main.java:16: error: incompatible types: int cannot be converted to boolean
     if(x = 0 && y = 0) {
          ^
2 errors
Language: Java

import java.util.Scanner;

public class Main {

public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int y = sc.nextInt();
        int i;
        while(true){
            x = sc.nextInt();
            if ( x == 0 ) break;
            if(x > y){
            i = x;
            x = y;
            y = i;
            System.out.println(x + " " + y);
            
        }
}

}



Compiler output:
Main.java:22: error: reached end of file while parsing
}
 ^
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;
        while(true){
        int x = sc.nextInt();
        int y = sc.nextInt();
            if ( x == 0 ) break;
            if(a > b){
            i = 
            System.out.println("Case " + i + ": " + x );
            
        }
}

}



Compiler output:
Main.java:19: error: reached end of file while parsing
}
 ^
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;
        while(true){
        int x = sc.nextInt();
        int y = sc.nextInt();
            if ( x == 0 ) break;
            if(a > b){
            i = x;
            x = y;
            y = i;
            System.out.println(x + " " + y);
            
        }
}

}



Compiler output:
Main.java:21: error: reached end of file while parsing
}
 ^
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;
        while(true){
        int x = sc.nextInt();
        int y = sc.nextInt();
            if ( x == 0 ) break;
            if(a > b){
            i = x;
            x = y;
            y = i;
            System.out.println(x + " " + y);
            }
        }
}

}



Compiler output:
Main.java:12: error: cannot find symbol
            if(a > b){
               ^
  symbol:   variable a
  location: class Main
Main.java:12: error: cannot find symbol
            if(a > b){
                   ^
  symbol:   variable b
  location: class Main
2 errors
Language: Java

import java.util.Scanner;

public class Main {

public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int tmp;
        while(true){
        int x = sc.nextInt();
        int y = sc.nextInt();
            if ( x == 0 ) break;
            if(x > y){
            ymp = x;
            x = y;
            y = tmp;
            System.out.println(x + " " + y);
            }
        }
}

}



Compiler output:
Main.java:13: error: cannot find symbol
            ymp = x;
            ^
  symbol:   variable ymp
  location: class Main
1 error
Language: Java

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

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner;
    while(true){
      String str = sc.nextLine();
      int[] x = Integer.parseInt(str.split(" "));
      if(x[0] == 0 && x[1] == 0){
        break;
      }
      Arrays.sort(x);
      System.out.println(x[0] + " " + x[1]);
    }
  }
}


Compiler output:
Main.java:6: error: '(' or '[' expected
    Scanner sc = new Scanner;
                            ^
1 error
Language: Java

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

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    while(true){
      String str = sc.nextLine();
      int[] x = Integer.parseInt(str.split(" "));
      if(x[0] == 0 && x[1] == 0){
        break;
      }
      Arrays.sort(x);
      System.out.println(x[0] + " " + x[1]);
    }
  }
}


Compiler output:
Main.java:9: error: incompatible types: String[] cannot be converted to String
      int[] x = Integer.parseInt(str.split(" "));
                                          ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: Java

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

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    while(true){
      String str = sc.nextLine();
      String[] str2 = str.split(" ");
      int[] x = new int[str2.length()];
      for (int i = 0; i < str2.length(); i++){
        x[i] = Integer.parseInt(str2[i]);
      }
      if(x[0] == 0 && x[1] == 0){
        break;
      }
      Arrays.sort(x);
      System.out.println(x[0] + " " + x[1]);
    }
  }
}


Compiler output:
Main.java:10: error: cannot find symbol
      int[] x = new int[str2.length()];
                            ^
  symbol:   method length()
  location: variable str2 of type String[]
Main.java:11: error: cannot find symbol
      for (int i = 0; i < str2.length(); i++){
                              ^
  symbol:   method length()
  location: variable str2 of type String[]
2 errors
Language: Java

class Main
  while(true)
    str = gets
    str = str.split(" ")
    str.map { |x| x.to_i }
    str.sort_by! { |n| n }
    break if str[0] == 0
    puts "#{str[0]} #{str[1]}"
  end
end


Compiler output:
Main.java:1: error: '{' expected
class Main
          ^
Main.java:5: error: illegal start of type
    str.map { |x| x.to_i }
              ^
Main.java:5: error: <identifier> expected
    str.map { |x| x.to_i }
                ^
Main.java:5: error: <identifier> expected
    str.map { |x| x.to_i }
                        ^
Main.java:6: error: class, interface, enum, or record expected
    str.sort_by! { |n| n }
    ^
5 errors
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while (true) {
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		if (a == 0 && b == 0) {
			break;
		}
		if (a <= b) {
			System.out.println (a + " " + b);
		} else {
			System.out.println (b + " " + a);
		}
		}
	}



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

public class Main {
	public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int x = sc.nextInt();
	int y = sc.nextInt();

if(x>y){
System.out.println(x.y);
}else{
System.out.println(y.x);
}

}
}



Compiler output:
Main.java:3: error: cannot find symbol
	Scanner sc = new Scanner(System.in);
	^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
	Scanner sc = new Scanner(System.in);
	                 ^
  symbol:   class Scanner
  location: class Main
Main.java:8: error: int cannot be dereferenced
System.out.println(x.y);
                    ^
Main.java:10: error: int cannot be dereferenced
System.out.println(y.x);
                    ^
4 errors
Language: Java

import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int x = sc.nextInt();
	int y = sc.nextInt();

if(x>y){
System.out.println(x.y);
}else{
System.out.println(y.x);
}

}
}



Compiler output:
Main.java:9: error: int cannot be dereferenced
System.out.println(x.y);
                    ^
Main.java:11: error: int cannot be dereferenced
System.out.println(y.x);
                    ^
2 errors
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int x = sc.nextInt();
		int y = sc.nextInt();

		for (int i = 1; i < 3000; i++) {
			if (x == 0 && y == 0)
				break;
			if (x < y) {
				System.out.println(x + " " + y);
			} else if{
				System.out.println(y + " " + x);
			}
		}
	}
}



Compiler output:
Main.java:14: error: '(' expected
			} else if{
			         ^
1 error