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

#include "stdio.h"


int _tmain(void)
{
	int r=0;
	int n=0;
	while(1)
	{
		scanf("%d",&n);
		if(n==0)
			break;
		printf("Case %d %d\n", ++r ,n);

	}
	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(){
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:4: error: 'X' was not declared in this scope
    8 | if(X==0) break;
      |    ^
Language: C++

import java.util.Scanner;

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

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
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++

import java.util.Scanner;

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

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
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(void){
  int x[],i = 0,a;
  do{
    scanf("%d",&x[i]);
    i++;
  }while(x[i-1] != 0);
  a = i;
  for(i=1;i<a;i++){
    printf("case %d: %d\n",i,x[i-1]);
  }
  return(0);
}

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

include <stdio.h>
int main(void){
  int x[100],i = 0,a;
  do{
    scanf("%d",&x[i]);
    i++;
  }while(x[i-1] != 0);
  a = i-1;
  for(i=0;i<a;i++){
    printf("Case %d: %d\n",i+1,x[i]);
  }
  return(0);
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <stdio.h>
      | ^~~~~~~
Language: C++

include<stdio.h>
int main(){
  int a,b;
  scanf("%d",&b);
  for(a=1;b!=0;a++){
    printf("Case %d: %d\n",a,b);
    scanf("%d",&b);
  }
  return(0);
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<stdio.h>
      | ^~~~~~~
Language: C++

#include<stdio.h>

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


}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:17: error: expected primary-expression before ';' token
    4 |         int x = ;
      |                 ^
Language: C++

#include<stdio.h>

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

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

#include<stdio.h>
int main(){
  int x[i],i=0,j;
  while(1==1){
    if(0<x||0>x){
  scanf("%d",&x[i]);
  i++;
    }
    if(x==0){
      break;
    }
  }
  int i=j
    for(i=0;i<=j;i++)
    printf("Case %d:%d\n",i,x);
    return(0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'i' was not declared in this scope
    3 |   int x[i],i=0,j;
      |         ^
a.cc:5:10: error: 'x' was not declared in this scope
    5 |     if(0<x||0>x){
      |          ^
a.cc:9:8: error: 'x' was not declared in this scope
    9 |     if(x==0){
      |        ^
Language: C++

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

		}
	}
	

}

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:31: error: inconsistent user-defined literal suffixes 'i' and 'x' in string literal
   13 |                 cout<<"Cace "i": "x<<endl;
      |                               ^~~~~
a.cc:13:31: error: unable to find string literal operator 'operator""i' with 'const char [8]', 'long unsigned int' arguments
Language: C++

#include <iostream>
using namespace std;

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

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

#include <stdio.h>

int main(int argc, char *argv[])
{
    int num = 1;
    int x;

    scanf("%d", &x);
    while(x!=0)
    {
        printf("Case %d: %d\n", i, x);
        num++;
    }
    
    return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:11:33: error: 'i' was not declared in this scope
   11 |         printf("Case %d: %d\n", i, x);
      |                                 ^
Language: C++

#include<stdio.h>
int main(){
  int a[101],b=1;
  while(a[b-1]!=0){
    scanf("%d",&a[b]);
    b++;
  }
  for(c=1;c<b-2;c++){
    printf("Case%d:%d\n",c,a[c]);
  }
  return(0);
}

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

#include<stdio.h>
int main(){
  int x[101],b=1,c;
  while(x[b-1]!=0){
    scanf("%d",&x[b]);
    b++;
  }
  for(i=1;c<i-1;i++){
    printf("Case %d: %d\n",i,x[i]);
  }
  return(0);
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:18: error: invalid types 'int[int]' for array subscript
    5 |     scanf("%d",&n[i]);
      |                  ^
a.cc:6:9: error: invalid types 'int[int]' for array subscript
    6 |     if(n[i]==0){
      |         ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: invalid types 'int[int]' for array subscript
    6 |     if(n[i]==0){
      |         ^
Language: C++

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



	return 0;
}2

Compiler output:
a.cc:16:2: error: expected unqualified-id before numeric constant
   16 | }2
      |  ^
Language: C++

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

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

#Include<iostream>
using namespace std;

int main(){
  int i,input;
  cin >> input;
  for(i=1;input!=0;i++){
    cout << "case " << i << ":" << input <<endl;
    cin >> input;
  }
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #Include; did you mean #include?
    1 | #Include<iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> input;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #Include<iostream>
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout << "case " << i << ":" << input <<endl;
      |     ^~~~
a.cc:8:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:44: error: 'endl' was not declared in this scope
    8 |     cout << "case " << i << ":" << input <<endl;
      |                                            ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #Include<iostream>
Language: C++

#Include<iostream>
using namespace std;

int main(){
  int i,input;
  cin >> input;
  for(i=1;input!=0;i++){
    cout << "case " << i << ": " << input <<endl;
    cin >> input;
  }
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #Include; did you mean #include?
    1 | #Include<iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> input;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #Include<iostream>
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout << "case " << i << ": " << input <<endl;
      |     ^~~~
a.cc:8:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:45: error: 'endl' was not declared in this scope
    8 |     cout << "case " << i << ": " << input <<endl;
      |                                             ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #Include<iostream>
Language: C++

import java.util.Scanner;
public class Main {
public static void Main(String[] args){

Scanner sc = new Scanner(System.in);

for (int i = 1; ; i++){
int x = sc,nextInt();
            if(x==0)break;
            System.out.println("Case " + i +i "  + x );
}
}
}

Compiler output:
a.cc:10:47: warning: missing terminating " character
   10 |             System.out.println("Case " + i +i "  + x );
      |                                               ^
a.cc:10:47: error: missing terminating " character
   10 |             System.out.println("Case " + i +i "  + x );
      |                                               ^~~~~~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
    2 | public class Main {
      | ^~~~~~
Language: C++

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

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

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

#include<cstdio>
int main(){for(char a[9],i=1;printf("Case %d: %s\n",i,gets(a));++i);}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:55: error: 'gets' was not declared in this scope; did you mean 'getw'?
    2 | int main(){for(char a[9],i=1;printf("Case %d: %s\n",i,gets(a));++i);}
      |                                                       ^~~~
      |                                                       getw
Language: C++

import java.util.*;
public class Main {

	public void doIt(){
		Scanner sc = new Scanner(System.in);
		int count = 1;
		int num = sc.nextInt();
		while(num != 0){
			System.out.println("Case "+ count + ": " + num );
			num = sc.nextInt();
			count++;
		}

	}

	public static void main(String[] args) {
		Main obj = new Main();
		obj.doIt();

	}

}

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:2:1: error: expected unqualified-id before 'public'
    2 | public class Main {
      | ^~~~~~
Language: C++

int main(i,n)
{
  for(;~scanf("%d",&n);){
    printf("Case %d: %d\n",i++,n);
  }
}

Compiler output:
a.cc:1:5: error: cannot declare '::main' to be a global variable
    1 | int main(i,n)
      |     ^~~~
a.cc:1:10: error: 'i' was not declared in this scope
    1 | int main(i,n)
      |          ^
a.cc:1:12: error: 'n' was not declared in this scope
    1 | int main(i,n)
      |            ^
a.cc:1:13: error: expression list treated as compound expression in initializer [-fpermissive]
    1 | int main(i,n)
      |             ^
Language: C++

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

Compiler output:
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
    1 | main(i,n){
      |     ^
Language: C++


#include<stdio.h>

#define N 100000
void main()
{
  int a[N];
  int i=0,m=10,j;
  while(m!=0){
    scanf("%d",&m);
    a[i]=m;
    i++;
  }
   
  for(j=0;j<i-1;j++){
    printf("Case %d: %d\n",j+1,a[j]);
  }
}

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









#include <stdio.h>








int main()
{
	int a,n=1;




&#160;while(1){
	




	 scanf("%d",&a);




	 if(a==0){




		 break;




	 }
	&#160;
	 else{












	 printf("Case %d: %d\n",n,a);
	&#160;
n++;




	 }








	
&#160;}
	
	
	
	
	return 0;
}

Compiler output:
a.cc:25:2: error: stray '#' in program
   25 | &#160;while(1){
      |  ^
a.cc:47:10: error: stray '#' in program
   47 |         &#160;
      |          ^
a.cc:62:10: error: stray '#' in program
   62 |         &#160;
      |          ^
a.cc:78:2: error: stray '#' in program
   78 | &#160;}
      |  ^
a.cc: In function 'int main()':
a.cc:25:3: error: lvalue required as unary '&' operand
   25 | &#160;while(1){
      |   ^~~
a.cc:47:11: error: lvalue required as unary '&' operand
   47 |         &#160;
      |           ^~~
a.cc:48:10: error: 'else' without a previous 'if'
   48 |          else{
      |          ^~~~
a.cc:62:11: error: lvalue required as unary '&' operand
   62 |         &#160;
      |           ^~~
a.cc:78:3: error: lvalue required as unary '&' operand
   78 | &#160;}
      |   ^~~
Language: C++

#include<iostream>
using namespace std;

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

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

#include <stdio.h>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: break statement not within loop or switch
    7 |   if (x == 0)break;
      |              ^~~~~
Language: C++

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

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

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

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

#include <stdio.h>

int main(void){
     int count = 1, x;
     scanf("%d"&x);
     while(x != 0){
          printf("Case %d: %d\n",count,x);
          scanf("%d",&x);
     }
     return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: invalid operands of types 'const char [3]' and 'int' to binary 'operator&'
    5 |      scanf("%d"&x);
      |            ~~~~^~
      |            |    |
      |            |    int
      |            const char [3]
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: invalid operands of types 'const char [3]' and 'int' to binary 'operator&'
    5 |      scanf("%d"&x);
      |            ~~~~^~
      |            |    |
      |            |    int
      |            const char [3]
Language: C++

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

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

/* 10006 */
#include <stdio.h>
int main()
{
   int x,i = 1;
   scanf ("%d", &x)
   if (x != 0)
      printf("Case %d: %d\n", i,x);
      i++;
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: expected ';' before 'if'
    6 |    scanf ("%d", &x)
      |                    ^
      |                    ;
    7 |    if (x != 0)
      |    ~~
Language: C++

/* 10006 */
#include <stdio.h>
int main()
{
   int x,i = 1;
   scanf ("%d", &x)
   if (x != 0) {
      printf("Case %d: %d\n", i,x);
      i++;
   } else {
   }
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: expected ';' before 'if'
    6 |    scanf ("%d", &x)
      |                    ^
      |                    ;
    7 |    if (x != 0) {
      |    ~~               
a.cc:10:6: error: 'else' without a previous 'if'
   10 |    } else {
      |      ^~~~
Language: C++

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

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

#include<iostream>
#include<string>

int main(){
        int i, j, x[MAX_N];
        i=0;
        do{
        std::cin >> x[i];
        i=i+1;
        }while(x[i-1]!=0);

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:21: error: 'MAX_N' was not declared in this scope
    5 |         int i, j, x[MAX_N];
      |                     ^~~~~
a.cc:8:21: error: 'x' was not declared in this scope
    8 |         std::cin >> x[i];
      |                     ^
a.cc:10:16: error: 'x' was not declared in this scope
   10 |         }while(x[i-1]!=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 << endl;
i++;
}
return 0;
}

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

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

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

#include <iostream>
using namespace std;

int x;
int main(){
	for(int i = 1; x!=0; i++)
		cin >> x;
		cout << "Case" << i << " "<< x << endl;
}

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

#include <iostream>
using namespace std;

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

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

#include <iostream>
using namespace std;

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

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

#include <iostream>
using namespace std;

int x;
int main(){

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected ',' or ';' before 'for'
    8 |         for(i; x!=0; i++)
      |         ^~~
a.cc:8:25: error: expected ';' before ')' token
    8 |         for(i; x!=0; i++)
      |                         ^
      |                         ;
Language: C++

#include<iostream>
using namespace std;

int main()
{
int n;
int count=0;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:1: error: 'else' without a previous 'if'
   12 | else cout<<"Case "<<count<<": "<<n<<endl;
      | ^~~~
Language: C++

import java.util.Scanner;

class Main{
        public static void main(String args[]){
                Scanner scan = new Scanner(System.in);
                for(int i=1; i<=100; i++){
                        int val = scan.nextInt();
                        if(val==0) break;
                        System.out.println("Case " + i + ": " + val);
                }
        }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:15: error: expected ':' before 'static'
    4 |         public static void main(String args[]){
      |               ^~~~~~~
      |               :
a.cc:4:33: error: 'String' has not been declared
    4 |         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:5:17: error: 'Scanner' was not declared in this scope
    5 |                 Scanner scan = new Scanner(System.in);
      |                 ^~~~~~~
a.cc:7:35: error: 'scan' was not declared in this scope
    7 |                         int val = scan.nextInt();
      |                                   ^~~~
a.cc:9:25: error: 'System' was not declared in this scope
    9 |                         System.out.println("Case " + i + ": " + val);
      |                         ^~~~~~
a.cc:9:56: error: invalid operands of types 'const char*' and 'const char [3]' to binary 'operator+'
    9 |                         System.out.println("Case " + i + ": " + val);
      |                                            ~~~~~~~~~~~ ^ ~~~~
      |                                                    |     |
      |                                                    |     const char [3]
      |                                                    const char*
Language: C++

#include<iostream>
using namespace std;

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

if(x==0){
break;
}

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

i++;
}

}

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

#include<iostream>
using namespace std;

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

while(1){
cin>>x;

if(x==0){
break;
}

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

i++;
}

}

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

#include<iostream>
using namespace std;

int main(){
int x;

while(1){
cin>>x;

if(x==0){
break;
}

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

i++;
}

}

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

#include <iostream>
using namespace std;

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

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

#include <vector>
using namespace std;

int main(int argc, char** argv)
{
  vector<int> testCases;

  while (true) {
    int input;
    cin >> input;
    if (input == 0) {
      break;
    }
    testCases.add(input);
  }

  int index  = 1;
  for (vector<int>::iterator i = testCases.begin(); i != testCases.end(); i++) {
    cout << "case " << index << ": " << *i;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:10:5: error: 'cin' was not declared in this scope
   10 |     cin >> input;
      |     ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <vector>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:14:15: error: 'class std::vector<int>' has no member named 'add'
   14 |     testCases.add(input);
      |               ^~~
a.cc:19:5: error: 'cout' was not declared in this scope
   19 |     cout << "case " << index << ": " << *i;
      |     ^~~~
a.cc:19:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <vector>
#include <iostream>
using namespace std;
 
int main(int argc, char** argv)
{
  vector<int> testCases;
 
  while (true) {
    int input;
    cin >> input;
    if (input == 0) {
      break;
    }
    testCases.add(input);
  }
 
  int index  = 1;
  for (vector<int>::iterator i = testCases.begin(); i != testCases.end(); i++) {
    cout << "case " << index << ": " << *i;
  }
 
  return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:15:15: error: 'class std::vector<int>' has no member named 'add'
   15 |     testCases.add(input);
      |               ^~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: expected primary-expression before 'int'
    9 |     while(cin >> int x)
      |                  ^~~
a.cc:9:17: error: expected ')' before 'int'
    9 |     while(cin >> int x)
      |          ~      ^~~~
      |                 )
a.cc:9:23: error: expected initializer before ')' token
    9 |     while(cin >> int x)
      |                       ^
Language: C++

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

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

Compiler output:
a.cc:11:1: error: extended character 　 is not valid in an identifier
   11 | 　　cin >> x;
      | ^
a.cc:11:1: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:11:1: error: '\U00003000\U00003000cin' was not declared in this scope
   11 | 　　cin >> x;
      | ^~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
	double a,b;
	cin >> a >> b;
	
	cout << floor(a/b) << " " << a%b << " " << a/b << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'floor' was not declared in this scope
    9 |         cout << floor(a/b) << " " << a%b << " " << a/b << endl;
      |                 ^~~~~
a.cc:9:39: error: invalid operands of types 'double' and 'double' to binary 'operator%'
    9 |         cout << floor(a/b) << " " << a%b << " " << a/b << endl;
      |                                      ~^~
      |                                      | |
      |                                      | double
      |                                      double
Language: C++

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

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

#include <iostream>
using namespace std;

int main() {

   int p;

   p=1;

        while(1){

    cin >> x

     if(x == 0) break;

     cout << "Case " << p <<": " << x ;

    }


	return 0;
}

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

#include <iostream>
using namespace std;

int main() {
   
   int p,x;

   p=1;

        while(1){

    cin >> x

     if(x == 0) break;

     cout << "Case " << p <<": " << x ;

    }


	return 0;
}

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

#include <iostream>
using namespace std;

int main() {
   
   int p,x;

   p=1;

        while(1){

    cin >> x ;

     if(x == 0) break;

else{

cout << "Case " << p <<": " << x \n;

  p = p+1;
}
  }


	return 0;
}

Compiler output:
a.cc:18:34: error: stray '\' in program
   18 | cout << "Case " << p <<": " << x \n;
      |                                  ^
a.cc: In function 'int main()':
a.cc:18:33: error: expected ';' before 'n'
   18 | cout << "Case " << p <<": " << x \n;
      |                                 ^ ~
      |                                 ;
Language: C++

#include <iostream>
using namespace std;
int main(){
	int c=1,n;
	while(cin >> n,n){
		cout << "Case " << c << ": " << n << endl;
	}
	return 0;100
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: expected ';' before '}' token
    8 |         return 0;100
      |                     ^
      |                     ;
    9 | }
      | ~
Language: Java

import java.util.Scanner;

public class Aoj10007 {

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

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

import java.util.Scanner;

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

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

import java.util.*;

class Main{
    private static Scanner s = new Scanner(System.in);
    public static void main(String[] args){
	int a,b;

	while(1){
	    a = s.nextInt();
	    b = s.nextInt();
	    if(a == 0 && b == 0)break;
	    if(a>b)System.out.println(b+" "+a);
	    else System.out.println(a+" "+b);
	}
    }
}

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

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int x, y, wk;
    while (True) {
      x = sc.nextInt()
      y = sc.nextInt()
      if (x == 0 && y == 0){
        break
      }
      if (x > y) {
        wk = x;
        x  = y;
        y  = wk;
      }
      System.out.println(x+" "+y);
    }
  }
}

Compiler output:
Main.java:7: error: ';' expected
      x = sc.nextInt()
                      ^
Main.java:8: error: ';' expected
      y = sc.nextInt()
                      ^
Main.java:10: error: ';' expected
        break
             ^
3 errors
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int x, y, wk;
    while (True) {
      x = sc.nextInt();
      y = sc.nextInt();
      if (x == 0 && y == 0){
        break;
      }
      if (x > y) {
        wk = x;
        x  = y;
        y  = wk;
      }
      System.out.println(x+" "+y);
    }
  }
}

Compiler output:
Main.java:6: error: cannot find symbol
    while (True) {
           ^
  symbol:   variable True
  location: class Main
1 error
Language: Java

import java.util.*;

public class AOJ_02 {
	public static void main(String[] args) {

		int[] ar = new int[2]; 

		Scanner sc = new Scanner(System.in);

		while(true){

			for(int i = 0;i < 2;i++){
				ar[i] = sc.nextInt();
			}

			if (ar[0] != 0 || ar[1] != 0){
				Arrays.sort(ar);
				System.out.println(ar[0] + " " + ar[1]);
			} else {
				break;
			}
		}
	}
}

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

import java.util.Scanner;

public class SwappingTwoNumbers {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);

		int x[] = new int[10000];
		int y[] = new int[10000];
		int temp,i;

		for(i=0;;i++){

			x[i] = scan.nextInt();
			y[i] = scan.nextInt();

			if(x[i] == 0 && y[i] == 0){
				break;
			}
		}

		for(int j=0;j<i;j++){
			temp = x[j];
			x[j] = y[j];
			y[j] = temp;

			System.out.println(x[j] + "," + y[j]);
		}

	}
}

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

import java.util.Scanner;

public class SwappingTwoNumbers {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);

		int x[] = new int[10100];
		int y[] = new int[10100];
		int temp,i;

		for(i=0;;i++){

			x[i] = scan.nextInt();
			y[i] = scan.nextInt();

			if(x[i] == 0 && y[i] == 0){
				break;
			}
		}

		for(int j=0;j<i;j++){
			temp = x[j];
			x[j] = y[j];
			y[j] = temp;

			System.out.println(x[j] + "," + y[j]);
		}

	}
}

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

import java.util.Scanner;

public class SwappingTwoNumbers {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);

		int x[] = new int[11000];
		int y[] = new int[11000];
		int temp,i;

		for(i=0;;i++){

			x[i] = scan.nextInt();
			y[i] = scan.nextInt();

			if(x[i] == 0 && y[i] == 0){
				break;
			}
		}

		for(int j=0;j<i;j++){
			temp = x[j];
			x[j] = y[j];
			y[j] = temp;

			System.out.println(x[j] + ", " + y[j]);
		}

	}
}

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

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


public class SwappingTwoNumbers {
    public static void main(String[] args){
        int x=0;
        int y=0;
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        while(true){
            try {
                String s=br.readLine();
                x=Integer.parseInt(s.substring(0,s.indexOf(" ")));
                y=Integer.parseInt(s.substring(s.indexOf(" ")+1,s.length()));
            } catch (NumberFormatException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }
            if(x==0&&y==0){
                break;
            }
            System.out.println((int)Math.min(x,y)+" "+(int)Math.max(x, y));
        }
    }
}

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

public class Main{
	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int a=0,b=0;

		while(true){
			try {
				String str = br.readLine();

				a = Integer.parseInt(str.substring(0, str.indexOf(" ")));
				b = Integer.parseInt(str.substring(str.indexOf(" ") + 1, str.length()));


			} catch (IOException e) {
				// TODO 自動生成された catch ブロック
				e.printStackTrace();
			}

			if(a == 0 && b == 0){
				break;
			}

			System.out.println(Math.min(a, b) + " " + Math.max(a, a));
		}
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		^
  symbol:   class BufferedReader
  location: class Main
Main.java:3: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                        ^
  symbol:   class BufferedReader
  location: class Main
Main.java:3: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                                           ^
  symbol:   class InputStreamReader
  location: class Main
Main.java:14: error: cannot find symbol
			} catch (IOException e) {
			         ^
  symbol:   class IOException
  location: class Main
4 errors
Language: Java

import java.util.Scanner;

class Main {
	public static void main {
		Scanner sc = new Scanner(System.in);
		while (sc.hasNext) {
		int i = sc.nextInt();
		int k = sc.nextInt();
		if (i == k) {
			break;
		} else if (i < k) {
			System.out.println(i+" "+k);
		} else {
			System.out.println(k+" "+i);
		}	
	}
}

Compiler output:
Main.java:4: error: '(' expected
	public static void main {
	                        ^
Main.java:17: error: reached end of file while parsing
}
 ^
2 errors
Language: Java

import java.io.BufferedReader;
import java.io.*;

public class Swapping_Two_Numbers {

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		while (true) {
			String array[] = br.readLine().split(" ");
			int a = Integer.parseInt(array[0]);
			int b = Integer.parseInt(array[1]);
			if (a == 0 && b == 0) {
				break;
			}
			if (a < b) {
				System.out.println(a + " " + b);
			} else {
				System.out.println(b + " " + a);
			}
		}
	}

}

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

package AOJ;

import java.util.Scanner;

	public class main {
		public static void main(String[] args) {
			Scanner sc=new Scanner(System.in);
			sc.useDelimiter("\\s"); 
			while(true){
				int x=sc.nextInt();
				int y=sc.nextInt();
				if(x==0 && y==0)break;
				
				if(x>y){
					int z=x;
					x=y;
					y=z;
				}
				System.out.printf("%d %d\n",x,y);
			}
		}
}

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

import java.util.Scanner;

	public class main {
		public static void main(String[] args) {
			Scanner sc=new Scanner(System.in);
			sc.useDelimiter("\\s"); 
			while(true){
				int x=sc.nextInt();
				int y=sc.nextInt();
				if(x==0 && y==0)break;
				
				if(x>y){
					int z=x;
					x=y;
					y=z;
				}
				System.out.printf("%d %d\n",x,y);
			}
		}
}

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

import java.util.Scanner;
	public class main {
		public static void main(String[] args) {
			Scanner sc=new Scanner(System.in);
			sc.useDelimiter("\\s"); 
			while(true){
				int x=sc.nextInt();
				int y=sc.nextInt();
				if(x==0 && y==0)break;
				
				if(x>y){
					int z=x;
					x=y;
					y=z;
				}
				System.out.printf("%d %d\n",x,y);
			}
		}
}

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

package AOJ;
import java.util.Scanner;
	public class main{
		public static void main(String[] args) {
			Scanner sc=new Scanner(System.in);
			sc.useDelimiter("\\s"); 
			while(true){
				int x=sc.nextInt();
				int y=sc.nextInt();
				if(x==0 && y==0)break;
				
				if(x>y){
					int z=x;
					x=y;
					y=z;
				}
				System.out.printf("%d %d\n",x,y);
			}
		}
}

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

package AOJ;
import java.util.Scanner;
public class main {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);			
		sc.useDelimiter("\\s"); 
		while(true){
			int x=sc.nextInt();
			int y=sc.nextInt();
			if(x==0 && y==0)break;
			if(x>y){
				int z=x;
				x=y;
				y=z;
			}
			System.out.printf("%d %d\n",x,y);
			}
		}
	}

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

import java.util.Scanner;

public class AOJ10007 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int lef = sc.nextInt();
		int rig = sc.nextInt();
		while(lef != 0 && rig != 0){
			if(rig < lef){
				int sub = rig;
				rig = lef;
				lef = sub;
			}
			System.out.println(lef+" "+rig);
			lef = 0;
			lef = 0;
			lef = sc.nextInt();
			rig = sc.nextInt();
		}
	}

}

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

#include <stdio.h>

int main(){
    int x,y;
    scanf("%d%d\n",&x,&y);
    while(x!=0||y!=0){
        printf("%d %d\n",a<b?a:b,a<b?b:a);
        scanf("%d%d\n",&x,&y);
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:26: error: 'a' undeclared (first use in this function)
    7 |         printf("%d %d\n",a<b?a:b,a<b?b:a);
      |                          ^
main.c:7:26: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:28: error: 'b' undeclared (first use in this function)
    7 |         printf("%d %d\n",a<b?a:b,a<b?b:a);
      |                            ^
Language: C

#include <stdio.h>

int main(void)
{
	double x[100];
	double y[100];
	double swap;
	double i;
	double j;
	
	i = 0;
	
	while (1) {
		scanf("%d %d", &x[i], &y[i]);
		i++;
		if (x[i - 1] == 0 && x[i - 1] == 0){
			break;
		}
	}
	
	for (j = 0; j < i - 1; j++){
		swap = x[j];
		x[j] = y[j];
		y[j] = swap;
		printf("%d %d\n", x[j], y[j]);
	}
	
	return (0);
}

Compiler output:
main.c: In function 'main':
main.c:14:34: error: array subscript is not an integer
   14 |                 scanf("%d %d", &x[i], &y[i]);
      |                                  ^
main.c:14:41: error: array subscript is not an integer
   14 |                 scanf("%d %d", &x[i], &y[i]);
      |                                         ^
main.c:16:22: error: array subscript is not an integer
   16 |                 if (x[i - 1] == 0 && x[i - 1] == 0){
      |                      ^
main.c:16:39: error: array subscript is not an integer
   16 |                 if (x[i - 1] == 0 && x[i - 1] == 0){
      |                                       ^
main.c:22:25: error: array subscript is not an integer
   22 |                 swap = x[j];
      |                         ^
main.c:23:18: error: array subscript is not an integer
   23 |                 x[j] = y[j];
      |                  ^
main.c:23:25: error: array subscript is not an integer
   23 |                 x[j] = y[j];
      |                         ^
main.c:24:18: error: array subscript is not an integer
   24 |                 y[j] = swap;
      |                  ^
main.c:25:36: error: array subscript is not an integer
   25 |                 printf("%d %d\n", x[j], y[j]);
      |                                    ^
main.c:25:42: error: array subscript is not an integer
   25 |                 printf("%d %d\n", x[j], y[j]);
      |                                          ^
Language: C

#include <stdio.h>

int main(void)
{
	double x[100];
	double y[100];
	double swap;
	double i;
	double j;
	
	i = 0;
	
	while (1) {
		scanf("%lf %lf", &x[i], &y[i]);
		i++;
		if (x[i - 1] == 0 && x[i - 1] == 0){
			break;
		}
	}
	
	for (j = 0; j < i - 1; j++){
		swap = x[j];
		x[j] = y[j];
		y[j] = swap;
		printf("%lf %lf\n", x[j], y[j]);
	}
	
	return (0);
}

Compiler output:
main.c: In function 'main':
main.c:14:36: error: array subscript is not an integer
   14 |                 scanf("%lf %lf", &x[i], &y[i]);
      |                                    ^
main.c:14:43: error: array subscript is not an integer
   14 |                 scanf("%lf %lf", &x[i], &y[i]);
      |                                           ^
main.c:16:22: error: array subscript is not an integer
   16 |                 if (x[i - 1] == 0 && x[i - 1] == 0){
      |                      ^
main.c:16:39: error: array subscript is not an integer
   16 |                 if (x[i - 1] == 0 && x[i - 1] == 0){
      |                                       ^
main.c:22:25: error: array subscript is not an integer
   22 |                 swap = x[j];
      |                         ^
main.c:23:18: error: array subscript is not an integer
   23 |                 x[j] = y[j];
      |                  ^
main.c:23:25: error: array subscript is not an integer
   23 |                 x[j] = y[j];
      |                         ^
main.c:24:18: error: array subscript is not an integer
   24 |                 y[j] = swap;
      |                  ^
main.c:25:38: error: array subscript is not an integer
   25 |                 printf("%lf %lf\n", x[j], y[j]);
      |                                      ^
main.c:25:44: error: array subscript is not an integer
   25 |                 printf("%lf %lf\n", x[j], y[j]);
      |                                            ^
Language: C

#include <stdio.h>

int main(void)
{
	int i, x, y, sub;
	
	do{
		scanf("%d %d", &x, &y);
		
		if(x == 0 && y == 0){
			return exit;
		}
		
		if(x > y){
			sub = x;
			x = y;
			y = sub;
		}
		
		printf("%d %d\n", x, y);
		
	}while(x == 0 && y == 0);

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:32: error: 'exit' undeclared (first use in this function)
   11 |                         return exit;
      |                                ^~~~
main.c:2:1: note: 'exit' is defined in header '<stdlib.h>'; this is probably fixable by adding '#include <stdlib.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdlib.h>
    2 | 
main.c:11:32: note: each undeclared identifier is reported only once for each function it appears in
   11 |                         return exit;
      |                                ^~~~