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

#include <iostream>
using namespace std;

int main() {
  int x, y;
  cin >> x >> y;

  if(!x && !y) { break; }

  if(x < y) {
    cout << x << " " << y;
  } else {
    cout << y << " " << x;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: break statement not within loop or switch
    8 |   if(!x && !y) { break; }
      |                  ^~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
  int x, y;
  cin >> x >> y;

???while(true) {

    if(!x && !y) { break; }

    if(x < y) {
      cout << x << " " << y;
    } else {
      cout << y << " " << x;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: expected primary-expression before '?' token
    8 | ???while(true) {
      | ^
a.cc:8:2: error: expected primary-expression before '?' token
    8 | ???while(true) {
      |  ^
a.cc:8:3: error: expected primary-expression before '?' token
    8 | ???while(true) {
      |   ^
a.cc:8:4: error: expected primary-expression before 'while'
    8 | ???while(true) {
      |    ^~~~~
a.cc:8:4: error: expected ':' before 'while'
    8 | ???while(true) {
      |    ^~~~~
      |    :
a.cc:8:4: error: expected primary-expression before 'while'
    8 | ???while(true) {
      |    ^~~~~
a.cc:8:4: error: expected ':' before 'while'
    8 | ???while(true) {
      |    ^~~~~
      |    :
a.cc:8:4: error: expected primary-expression before 'while'
    8 | ???while(true) {
      |    ^~~~~
a.cc:8:4: error: expected ':' before 'while'
    8 | ???while(true) {
      |    ^~~~~
      |    :
a.cc:8:4: error: expected primary-expression before 'while'
    8 | ???while(true) {
      |    ^~~~~
Language: C++

#include <iostream>

int main(int argc, char const *argv[]) {
  int x,y;
  int tmp;
  while (1) {
    std::cin >> x >> y;
    if (x == y == 0) {
      std::cout << '\n';
      break;
    }
    if (x > y) {
      tmp = x;
      x = y;
      y = tmp;
    }
    std::cout << x << " " << y <<;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:17:34: error: expected primary-expression before ';' token
   17 |     std::cout << x << " " << y <<;
      |                                  ^
Language: C++


import java.util.Scanner;

public class MainC {
	public static void main(String []args){
		//????????£?????????????????????
		Scanner sc = new Scanner(System.in);

		//??°?????????
		while(true){
			//x???????????????
			int x = sc.nextInt();
			//y???????????????
			int y = sc.nextInt();


			//????????????????°??????????????????????
			if(x < y){
				System.out.println(y + " " + x);
			}else if(x == y){
				System.out.println(x + " " + y);
			}else if(y < x){
				System.out.println(x + " " + y);
			}
			//??????????????°??????0?????´???
			if(x == 0 && y == 0){
				break;
			}
		}
	}

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

#include<stdio.h>
int main(){
	int x,y;
	scanf("%d %d",&x,&y);
	if(x<y){
		printf("%d %d\n",x,y);
		else{
			printf("%d %d\n",y,x);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: expected '}' before 'else'
    7 |                 else{
      |                 ^~~~
a.cc:5:16: note: to match this '{'
    5 |         if(x<y){
      |                ^
a.cc:10:2: error: expected '}' at end of input
   10 | }
      |  ^
a.cc:2:11: note: to match this '{'
    2 | int main(){
      |           ^
Language: C++

i=0
while 1
    x,y = map(int,input().split())
    if x==0 or y==0;
        break

    n=[x,y]
    n.sort()
    print n
    i+=1

Compiler output:
a.cc:1:1: error: 'i' does not name a type
    1 | i=0
      | ^
a.cc:5:9: error: expected unqualified-id before 'break'
    5 |         break
      |         ^~~~~
Language: C++

#include <iostream>

using namespace std;

int main(void) {
    int i, x[2];
    
    i = 1;
    cin >> x[0] >> x[1];

    
    while(x[0]!=0 || x[1]!=0) {
        sort(x, x+2);
        cout << x[0] << " " << x[1] << endl;
        cin >> x[0] >> x[1];
    }
    
    return 0;
}

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

#include <iostream>

int main () {
  int x, y;
  cnt = 1;
  while(1){
    std::cin >> x >> y;
  	if(x + y == 0)
  	  break;
  	else if(x < y) 
  	  std::cout << x << ' ' <<  y << std::endl;
  	else
  	  std::cout << y << ' ' <<  x << std::endl;
  }
  return 0;
}

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

int main(){
    int x, y, i, n;
    for(i=0; i<4000; i++){
    scanf("%d%d", &x, &y);
        if(x>y){
        n=x;
        x=y;
        y=n;
        printf("%d %d\n", x, y);}
        else{printf("%d %d\n", x, y);}}
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'scanf' was not declared in this scope
    4 |     scanf("%d%d", &x, &y);
      |     ^~~~~
a.cc:9:9: error: 'printf' was not declared in this scope
    9 |         printf("%d %d\n", x, y);}
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
a.cc:10:14: error: 'printf' was not declared in this scope
   10 |         else{printf("%d %d\n", x, y);}}
      |              ^~~~~~
a.cc:10:14: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

include <iostream>                                                     
using namespace std;                                                    
                                                                        
int main(void) {                                                        
  int x, y;                                                             
  while (true) {                                                        
    cin >> x >> y;                                                      
    if (x==0 && y==0) {                                                 
      break;                                                            
    }                                                                   
    int maxxy = max(x,y);                                               
    int minxy = min(x,y);                                               
    cout << minxy << " " << maxxy << endl;                              
  }                                                                     
  return 0;                                                             
}                                                                       
                                         

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin >> x >> y;
      |     ^~~
a.cc:11:17: error: 'max' was not declared in this scope; did you mean 'maxxy'?
   11 |     int maxxy = max(x,y);
      |                 ^~~
      |                 maxxy
a.cc:12:17: error: 'min' was not declared in this scope; did you mean 'main'?
   12 |     int minxy = min(x,y);
      |                 ^~~
      |                 main
a.cc:13:5: error: 'cout' was not declared in this scope
   13 |     cout << minxy << " " << maxxy << endl;
      |     ^~~~
a.cc:13:38: error: 'endl' was not declared in this scope
   13 |     cout << minxy << " " << maxxy << endl;
      |                                      ^~~~
Language: C++

#include<iostream>
using namespace std;

int main()
{
   int NumMem[2][3000];
   int cnt=0;
   for(int i=0;i<3000;i++){
       cin>>NumMem[0][i]>>NumMem[1][i];
       if((NumMem[0][i]==0)&&(NumMem[1][i]==0)||(i==2999))
       {
           cnt=i;
           break;
       }
   }
   for(int i=0;i<cnt;i++){
       if(NumMem[0][i]<<NumMem[1][i])
       {
           cout<<nummem[0][i]<<" "<<nummem[1][i]<<endl;
       }else
       {
           cout<<nummem[1][i]<<" "<<nummem[0][i]<<endl;
       }
   }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: 'nummem' was not declared in this scope; did you mean 'NumMem'?
   19 |            cout<<nummem[0][i]<<" "<<nummem[1][i]<<endl;
      |                  ^~~~~~
      |                  NumMem
a.cc:22:18: error: 'nummem' was not declared in this scope; did you mean 'NumMem'?
   22 |            cout<<nummem[1][i]<<" "<<nummem[0][i]<<endl;
      |                  ^~~~~~
      |                  NumMem
Language: C++

#include<iostream>
using namespace std;
 
int main()
{
   int NumMem[2][3000];
   int cnt=0;
   for(int i=0;i<3000;i++){
       cin>>NumMem[0][i]>>NumMem[1][i];
       if((NumMem[0][i]==0)&&(NumMem[1][i]==0)||(i==2999))
       {
           cnt=--i;
           break;
       }
   }
   for(int i=0;i<cnt;i++){
       if(NumMem[0][i]<<NumMem[1][i])
       {
           cout<<nummem[0][i]<<" "<<nummem[1][i]<<endl;
       }else
       {
           cout<<nummem[1][i]<<" "<<nummem[0][i]<<endl;
       }
   }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: 'nummem' was not declared in this scope; did you mean 'NumMem'?
   19 |            cout<<nummem[0][i]<<" "<<nummem[1][i]<<endl;
      |                  ^~~~~~
      |                  NumMem
a.cc:22:18: error: 'nummem' was not declared in this scope; did you mean 'NumMem'?
   22 |            cout<<nummem[1][i]<<" "<<nummem[0][i]<<endl;
      |                  ^~~~~~
      |                  NumMem
Language: C++

#include<iostream>
using namespace std;
  
int main()
{
   int NumMem[2][3000];
   int cnt=0;
   for(int i=0;i<3000;i++){
       cin>>NumMem[0][i]>>NumMem[1][i];
       if((NumMem[0][i]==0)&&(NumMem[1][i]==0)||(i==2999))
       {
           cnt=--i;
           break;
       }
   }
   for(int i=0;i<cnt;i++){
       if(NumMem[0][i]<<NumMem[1][i])
       {
           cout<<NumMem[0][i]<<" "<<NumMem[1][i]<<endl;
       }else
       {
           cout<<NumMem[1][i]<<" "<<NumMem[0][i]<<endl;
       }
   

Compiler output:
a.cc: In function 'int main()':
a.cc:23:9: error: expected '}' at end of input
   23 |        }
      |         ^
a.cc:16:26: note: to match this '{'
   16 |    for(int i=0;i<cnt;i++){
      |                          ^
a.cc:23:9: error: expected '}' at end of input
   23 |        }
      |         ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include<iostream>
using namespace std;
   
int main()
{
   int NumMem[2][3000];
   int cnt=0;
   for(int i=0;i<3000;i++){
       cin>>NumMem[0][i]>>NumMem[1][i];
       if((NumMem[0][i]==0)&&(NumMem[1][i]==0)||(i==2999))
       {
           cnt=--i;
           break;
       }
   }
   for(int i=0;i<cnt;i++){
       if(NumMem[0][i]<<NumMem[1][i])
       {
           cout<<NumMem[0][i]<<" "<<NumMem[1][i]<<endl;
       }else
       {
           cout<<NumMem[1][i]<<" "<<NumMem[0][i]<<endl;
       }
}

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

#include<iostream>
using namespace std;
     
int main()
{
   int NumMem[2][3000];
   int cnt=0;
   for(int i=0;i<3000;i++){
       cin>>NumMem[0][i]>>NumMem[1][i];
       if((NumMem[0][i]==0)&&(NumMem[1][i]==0)||(i==2999))
       {
           break;
       }
       if(NumMem[0][i]<<NumMem[1][i])
       {
           cout<<NumMem[0][i]<<" "<<NumMem[1][i]<<endl;
       }else
       {
           cout<<NumMem[1][i]<<" "<<NumMem[0][i]<<endl;
       }
    }
   }
    return 0;
}

Compiler output:
a.cc:23:5: error: expected unqualified-id before 'return'
   23 |     return 0;
      |     ^~~~~~
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: C++

#include<iostream>
using namespace std;

int main()
{
  for(int i=0;i<3000;i++)
  {
    cin>>x>>y
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 'x' was not declared in this scope
    8 |     cin>>x>>y
      |          ^
a.cc:8:13: error: 'y' was not declared in this scope
    8 |     cin>>x>>y
      |             ^
a.cc:9:4: error: expected '}' at end of input
    9 |   }
      |    ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
	int  x, y;
	for (int i = 0; ; i++) {
	cin >> x >> y;
	if (x == 0 && y == 0) break;
	if (x > y) {
		int tmp = x;
		x = y;
		y = tmp;
	}

	cout << x << ' ' << y << '\n';

	return 0;

}

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

#include<iostream>
using namespace std;
int min(int x,int y){
if(x<y)
return x;
else
return y;


}
int max(int x,int y){
if(x>y)
return x;
else
return y;


}
int main(){
int a,b;
while(true){
cin>>x>>y;
if(x==0&&y==0)
break;
cout<<min(a,b)<<' '<<max(a,b)<<'\n';

}



return 0;
}

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

#include <iostream>
using namespace std;

int main(){
 int a[2];
 
 for(while 1){
  cin >> a[0] >> a[1];
  if(a[0]==0&&a[1]==0)break;
  sort(a,a+2);
  cout << a[0] << <<" "<< a[1] << endl;
 }

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: expected primary-expression before 'while'
    7 |  for(while 1){
      |      ^~~~~
a.cc:14:2: error: expected primary-expression before 'return'
   14 |  return 0;
      |  ^~~~~~
a.cc:12:3: error: expected ';' before 'return'
   12 |  }
      |   ^
      |   ;
   13 | 
   14 |  return 0;
      |  ~~~~~~
a.cc:14:2: error: expected primary-expression before 'return'
   14 |  return 0;
      |  ^~~~~~
a.cc:12:3: error: expected ')' before 'return'
   12 |  }
      |   ^
      |   )
   13 | 
   14 |  return 0;
      |  ~~~~~~
a.cc:7:5: note: to match this '('
    7 |  for(while 1){
      |     ^
Language: C++

#include <iostream>
using namespace std;

int main(){
 int a[2];
 
 while(1){
  cin >> a[0] >> a[1];
  if(a[0]==0&&a[1]==0)break;
  sort(a,a+2);
  cout << a[0] << <<" "<< a[1] << endl;
 }

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   10 |   sort(a,a+2);
      |   ^~~~
      |   short
a.cc:11:19: error: expected primary-expression before '<<' token
   11 |   cout << a[0] << <<" "<< a[1] << endl;
      |                   ^~
Language: C++

#include <iostream>
using namespace std;

int main(){
 int a,b;
 
 while(1){
  cin >> a >> b;
  if(a==0&&b==0)break;
  if(a<b) cout << a << <<" "<< b << endl;
  else cout << b << <<" "<< a << endl;
 }

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: expected primary-expression before '<<' token
   10 |   if(a<b) cout << a << <<" "<< b << endl;
      |                        ^~
a.cc:11:21: error: expected primary-expression before '<<' token
   11 |   else cout << b << <<" "<< a << endl;
      |                     ^~
Language: C++

#include <iostream>
using namespace std;

int main(){
 int a,b;
 
 while(1){
  cin >> a >> b;
  if(a == 0 && b == 0)break;
  if(a<b) cout << a << <<" "<< b << endl;
  else cout << b << <<" "<< a << endl;
 }

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: expected primary-expression before '<<' token
   10 |   if(a<b) cout << a << <<" "<< b << endl;
      |                        ^~
a.cc:11:21: error: expected primary-expression before '<<' token
   11 |   else cout << b << <<" "<< a << endl;
      |                     ^~
Language: C++

#include<cstdio> // printf??¨???????????¨???
#include<algorithm> 

int main(){
	int a[2], i=0;
	while(true){ // ????????????
	i++;	//i ?????????????¢??????????
	scanf("%d %d",&a, &a);	//%d ?????´??°???a?????????&????????????
	if(a[0] && a[1]) 
		sort(a,a+2)
		printf("%d, %d\n",a[0],a[1]);// \n????????????
	else break;

	}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
   10 |                 sort(a,a+2)
      |                 ^~~~
      |                 std::sort
In file included from /usr/include/c++/14/algorithm:86,
                 from a.cc:2:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
Language: C++

#include<cstdio> // printf??¨???????????¨???
#include<algorithm> 

int main(){
	int a[2], i=0;
	while(true){ // ????????????
	i++;	//i ?????????????¢??????????
	scanf("%d %d",&a, &a);	//%d ?????´??°???a?????????&????????????
	if(a[0] && a[1]) 
		sort(a,a+2);
		printf("%d, %d\n",a[0],a[1]);// \n????????????
	else break;

	}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
   10 |                 sort(a,a+2);
      |                 ^~~~
      |                 std::sort
In file included from /usr/include/c++/14/algorithm:86,
                 from a.cc:2:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
a.cc:12:9: error: 'else' without a previous 'if'
   12 |         else break;
      |         ^~~~
Language: C++

#include<cstdio>

int main(){
	int x,y;
	while(1){
		cin >> x >> y;
		if (x==0 && y==0) break;
		if (x<y){
		}else{
			swap(x,y); // swap(x,y)??§x,y?????????????????????
		}
		printf("%d,%d\n",x,y);
	}
	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 >> y;
      |                 ^~~
a.cc:10:25: error: 'swap' was not declared in this scope
   10 |                         swap(x,y); // swap(x,y)??§x,y?????????????????????
      |                         ^~~~
Language: C++

include<iostream>
using namespace std;
 
int main(){
    int x,y;
    while(1){
        cin >> x>>y;
        if ( x == 0 && y==0) break;
         
        if(x<y){
        }else{
            swap(x,y);
        }
        printf("%d %d\n",x,y);
    }
    return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> x>>y;
      |         ^~~
a.cc:12:13: error: 'swap' was not declared in this scope
   12 |             swap(x,y);
      |             ^~~~
a.cc:14:9: error: 'printf' was not declared in this scope
   14 |         printf("%d %d\n",x,y);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | include<iostream>
Language: C++

int main(int argc,const char * argv[]){
    int x[3000];
    int y[3000];
    int i;
    
    for(i=0;;i++){
        printf("x[%d] y[%d]?",i+1,i+1);
        scanf("%d %d",&x[i],&y[i]);
        if(x[i]==0 && y[i]==0){
            break;
        }
    }
    
    for(i=0;;i++){
        if(x[i]==0 && y[i]==0){
            break;
        }
        printf("%d %d\n",x[i],y[i]);
    }
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:7:9: error: 'printf' was not declared in this scope
    7 |         printf("x[%d] y[%d]?",i+1,i+1);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(int argc,const char * argv[]){
a.cc:8:9: error: 'scanf' was not declared in this scope
    8 |         scanf("%d %d",&x[i],&y[i]);
      |         ^~~~~
a.cc:18:9: error: 'printf' was not declared in this scope
   18 |         printf("%d %d\n",x[i],y[i]);
      |         ^~~~~~
a.cc:18:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include<iostream>
using namespace std;
int main(){
  int x,y;
  while( cin>>x>>y ) {
  	if ( x ==0 && y== 0 ) break;
  	if ( x < y ) {
  		cout<<x<<" "<<y<<endl;
  	} else ( y < x ) {
  		cout<<y<<" "<<x<<endl;
          }
}return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:25: error: expected ';' before '{' token
    9 |         } else ( y < x ) {
      |                         ^~
      |                         ;
Language: C++

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();
    while(x != 0 || y != 0){
      if(x > y) {
        System.out.println(y + " " + x);
      }else {
        System.out.println(x + " " + y);
      }
      x = sc.nextInt();
      y = sc.nextInt();
    }
  }
}

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++

while str = gets do
  array = str.chomp.split(" ").map(&: to_i)
  break if array[0] == 0 && array[1] == 0
  array.sort
  puts "#{array[0]} #{array[1]}"
end
   
  

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while str = gets do
      | ^~~~~
Language: C++

#include <iostream>

int main() {
  ios::sync_with_stdio(false);
  int x;
  int y;

  while(x != 0 && y != 0) {
    std::cin >> x >> y;
    if(x != y) {
      using std::swap;
      swap(x, y);
    }
    std::cout << x << " " << y << std::endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'ios' has not been declared
    4 |   ios::sync_with_stdio(false);
      |   ^~~
Language: C++

#include <iostream>

int main() {
  int x;
  int y;

  for(;;;)
    std::cin >> x >> y;
    if((x == 0) && (y == 0)) {
      break;
    }
    int tmp = x;
    x = y;
    y = tmp;
    std::cout << x << " " << y << std::endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: expected primary-expression before ';' token
    7 |   for(;;;)
      |         ^
a.cc:7:9: error: expected ')' before ';' token
    7 |   for(;;;)
      |      ~  ^
      |         )
a.cc:7:10: error: expected primary-expression before ')' token
    7 |   for(;;;)
      |          ^
a.cc:10:7: error: break statement not within loop or switch
   10 |       break;
      |       ^~~~~
a.cc: At global scope:
a.cc:18:3: error: expected unqualified-id before 'return'
   18 |   return 0;
      |   ^~~~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include <iostream>

int main() {
  int x;
  int y;

  for(;;;) {
    std::cin >> x >> y;
    if((x == 0) && (y == 0)) {
      break;
    }
    int tmp = x;
    x = y;
    y = tmp;
    std::cout << x << " " << y << std::endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: expected primary-expression before ';' token
    7 |   for(;;;) {
      |         ^
a.cc:7:9: error: expected ')' before ';' token
    7 |   for(;;;) {
      |      ~  ^
      |         )
a.cc:7:10: error: expected primary-expression before ')' token
    7 |   for(;;;) {
      |          ^
Language: C++

#include <iostream>
#include <algorithm>

int main() {
  int x;
  int y;

  while(1) {
    std::cin >> x >> y;
    if((x == 0) && (y == 0)) {
      break;
    }
    if(x > y) {
      using std;
      std::swap(x, y);
    }
    std::cout << x << " " << y << std::endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: expected nested-name-specifier before 'std'
   14 |       using std;
      |             ^~~
Language: C++

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

int main() {
	vector<int> v;
	int temp, temp2;
	while (1) {
		scanf_s("%d", &temp);
		scanf_s("%d", &temp2);
		if (temp == 0 && temp2 == 0) {
			break;
		}
		else {
			v.push_back(temp);
			v.push_back(temp2);
		}
	}

	for (int i = 0; i < v.size(); i = i+ 2) {
		if (v[i] <= v[i + 1]) {
			printf("%d %d\n", v[i], v[i + 1]);
		}
		else {
			printf("%d %d\n", v[i+1], v[i]);
		}
	}
	return 0;
}

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

indata = input().split()
x = []
x.append(indata[0])
y = []
y.append(indata[1])

i = 1

while True:
    indata = input().split()
    x.append(indata[0])
    y.append(indata[1])
    if int(x[i]) == int(y[i]) == 0:
        break
    i += 1

for j in range(len(x)):
    if int(x[j]) != 0 and int(y[j]) != 0:
        print("{0} {1}".format(y[j],x[j]))

Compiler output:
a.cc:1:1: error: 'indata' does not name a type
    1 | indata = input().split()
      | ^~~~~~
Language: C++

#include <iostream>
#include <vector>
int main(){
    using namespace std;
    int i,x,y,z;
    vector<int> v;
    x = 1;
    y = 1;
    while(x!=0||y!=0){
        cin >> x >> y;
        if(x==0&&y==0){
            break;javascript:void(0)
        }else{
            if(x>y){
                z = x;
                x = y;
                y = z;
            }
            v.push_back(x);
            v.push_back(y);
        }
    }
    int size = v.size();
    for(i=0;i<(size/2);i++){
        cout << v[2*i] << " " << v[2*i+1] << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:37: error: expected ';' before '}' token
   12 |             break;javascript:void(0)
      |                                     ^
      |                                     ;
   13 |         }else{
      |         ~
Language: C++

#include <iostream>
#include <vector>
int main(){
    using namespace std;
    int i,x,y,z;
    vector<int> v;
    x = 1;
    y = 1;
    while(x!=0||y!=0){
        cin >> x >> y;
        if(x==0&&y==0){
            break;javascript:void(0)
        }
else{
            if(x>y){
                z = x;
                x = y;
                y = z;
            }
            v.push_back(x);
            v.push_back(y);
        }
    }
    int size = v.size();
    for(i=0;i<(size/2);i++){
        cout << v[2*i] << " " << v[2*i+1] << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:37: error: expected ';' before '}' token
   12 |             break;javascript:void(0)
      |                                     ^
      |                                     ;
   13 |         }
      |         ~
Language: C++

#include <iostream>

int main()
{
	int x, y;
	std::cin >> x >> y;

	while (x = 0 && y = 0) {
		if (x > y) {
			std::cout << x << " " << y << std::endl;
		}
		else {
			std::cout << y << " " << x << std::endl;
		}
		std::cin >> x >> y;
	}


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: lvalue required as left operand of assignment
    8 |         while (x = 0 && y = 0) {
      |                    ~~^~~~
Language: C++

\#include <iostream>

int main()
{
	int x, y;

	while (1) {
		std::cin >> x >> y;
		if (x == 0 && y == 0) { break; }

		if (x > y) {
			std::cout << y << " " << x << std::endl;
		}
		if(x<=y) {
			std::cout << x << " " << y << std::endl;
		}
	}


    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>
      |   ^~~~~~~
Language: C++

#include<stdio.h>
int main() {
	int x, y ,a;
	while (1) {
		scanf_s("%d%d", &x, &y);

		if (x == 0 && y == 0) {
			break;
		}
		if (x > y) {
			a = x;
			x = y;
			y = a;
			printf("%d %d", x, y);
		}
		else if (x == y){
			printf("%d %d", x, y);
		}
	}
	return 0;
}

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

#include<iostream>

using namespace std;

int main () {

    int x, y;

    while (1) {

        cin >> x >> y;

        if (x == 0 && y == 0) {

            break;

        }

        if (x < y) {

            cout << x << y << endl;

        } else {

            cout << y << x << endl;

        }

    return 0;

}

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

int main() {
	int n = 1;
	while (n <= 10000) {
		int a, b;
		scanf("%d %d", &a,&b);///////////////
		if (a < b) {
			printf("%d %d", a, b);
		}
		else {
			printf("%d %d", b, a);
		}
			n++;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: 'scanf' was not declared in this scope
    5 |                 scanf("%d %d", &a,&b);///////////////
      |                 ^~~~~
a.cc:7:25: error: 'printf' was not declared in this scope
    7 |                         printf("%d %d", a, b);
      |                         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main() {
a.cc:10:25: error: 'printf' was not declared in this scope
   10 |                         printf("%d %d", b, a);
      |                         ^~~~~~
a.cc:10:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include<iostream>
using namespace std;
int main(void){
	int x,y,t;
	int i=0;
	while(1){
		cin >> x >> y;
		if( x == 0|| y==0 ){break;}
		if( x > y ){
			t = x;
			x = y;
			y = t;
		}
		ansx[i] = x;
		ansy[i] = y;
		i++;
	}
	for(int j=0;j<i;i++){
		cout << ansx[i] << ansy[i] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'ansx' was not declared in this scope
   14 |                 ansx[i] = x;
      |                 ^~~~
a.cc:15:17: error: 'ansy' was not declared in this scope
   15 |                 ansy[i] = y;
      |                 ^~~~
a.cc:19:25: error: 'ansx' was not declared in this scope
   19 |                 cout << ansx[i] << ansy[i] << endl;
      |                         ^~~~
a.cc:19:36: error: 'ansy' was not declared in this scope
   19 |                 cout << ansx[i] << ansy[i] << endl;
      |                                    ^~~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
    int x, y;
    
    while(1){
        cin x;
        cin y;
        if((x == 0) && (y == 0)) break;
 
        if(x > y) cout << y << ' ' << x << endl;

        if(x < y) cout << x << ' ' << y << endl;
    }
    return 0;

}

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

#include<iostream>

using std::cin;
using std::cout;
using std::endl;

int main()
{
int x,y;

while(cin>>x>>y)
{
x>y?swap(x,y):;
cout<<x<<" "<<y<<endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'swap' was not declared in this scope
   13 | x>y?swap(x,y):;
      |     ^~~~
a.cc:13:5: note: suggested alternatives:
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
                 from /usr/include/c++/14/string:68,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/tuple:2823:5: note:   'std::swap'
 2823 |     swap(tuple<_Elements...>&, tuple<_Elements...>&) = delete;
      |     ^~~~
In file included from /usr/include/c++/14/bits/exception_ptr.h:41,
                 from /usr/include/c++/14/exception:166,
                 from /usr/include/c++/14/ios:41:
/usr/include/c++/14/bits/move.h:226:5: note:   'std::swap'
  226 |     swap(_Tp& __a, _Tp& __b)
      |     ^~~~
/usr/include/c++/14/bits/move.h:226:5: note:   'std::swap'
/usr/include/c++/14/bits/exception_ptr.h:229:5: note:   'std::__exception_ptr::swap'
  229 |     swap(exception_ptr& __lhs, exception_ptr& __rhs)
      |     ^~~~
a.cc:13:15: error: expected primary-expression before ';' token
   13 | x>y?swap(x,y):;
      |               ^
Language: C++

#include<iostream>
 
using std::cin;
using std::cout;
using std::endl;
 
int main()
{
int x,y;
 
while(cin>>x>>y)
{
x>y?std::swap(x,y):;
cout<<x<<" "<<y<<endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:20: error: expected primary-expression before ';' token
   13 | x>y?std::swap(x,y):;
      |                    ^
Language: C++

#include<iostream>
  
using std::cin;
using std::cout;
using std::endl;
  
int main()
{
int x,y;
  
while(cin>>x>>y&&!(x==0&&y==0)
{
if(x>y)std::swap(x,y);
cout<<x<<" "<<y<<endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:31: error: expected ')' before '{' token
   11 | while(cin>>x>>y&&!(x==0&&y==0)
      |      ~                        ^
      |                               )
   12 | {
      | ~
Language: C++

#include<iostream>
using namespace std;

int main()
{
	int x, y;
	cin >> x >> y;

	while (1)
	{
		if (x != 0)
		{
			cin >> x >> y;
			n++;
		}
		if (x == 0 && y == 0)
		{
			return 0;
			break;
		}
		if (x <= y)
		{
			cout << x << " " << y << "\n";
		}
		if (y < x)
		{
			cout << y << " " << x << "\n";
		}
		break;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:25: error: 'n' was not declared in this scope
   14 |                         n++;
      |                         ^
Language: C++

#include <iostream>[

int main(){
int x, y;
int Put;

do{
std::cin >> x >> y;
if(x != 0 && y != 0){
if(y < x){
Put = x;
x = y;
y = Put;
}
std::cout << x << ' ' << y <<std::endl;
}
} while(x != 0 && y != 0)
}

Compiler output:
a.cc:1:20: warning: extra tokens at end of #include directive
    1 | #include <iostream>[
      |                    ^
a.cc: In function 'int main()':
a.cc:17:26: error: expected ';' before '}' token
   17 | } while(x != 0 && y != 0)
      |                          ^
      |                          ;
   18 | }
      | ~
Language: C++

while true do 
  line = gets
  a,b = line.split(/\s/).map(&:to_i) 
  if a == 0 && b == 0
    break
  end
  puts "#{b} #{a}"
end

Compiler output:
a.cc:3:21: error: stray '\' in program
    3 |   a,b = line.split(/\s/).map(&:to_i)
      |                     ^
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while true do
      | ^~~~~
Language: C++

package main

import (
	"strconv"
	"bufio"
	"os"
	"strings"
	"fmt"
)

/*
 <url:http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_3_C>
 */

func init() {

}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	wtr := bufio.NewWriter(os.Stdout)
	for {
		scanner.Scan()
		stringInput := scanner.Text()
		stringSplited := strings.Split(stringInput," ")
		x,_ := strconv.Atoi(stringSplited[0])
		y,_ := strconv.Atoi(stringSplited[1])
		if x== 0 && y == 0{
			break
		}
		x,y = y,x
		fmt.Fprintln(wtr,x,y)
	}
	wtr.Flush()
}

// ????????????1?????????
func StrStdin() (stringReturned string) {
	scanner := bufio.NewScanner(os.Stdin)

	scanner.Scan()
	stringInput := scanner.Text()

	stringReturned = strings.TrimSpace(stringInput)
	return
}

// ??´??°???1?????????
func IntStdin() (int, error) {
	stringInput := StrStdin()
	return strconv.Atoi(strings.TrimSpace(stringInput))
}

// ?????????????????????????????????????????????Split()
func SplitWithoutEmpty(stringTargeted string, delim string) (stringReturned []string) {
	stringSplited := strings.Split(stringTargeted, delim)

	for _, str := range stringSplited {
		if str != "" {
			stringReturned = append(stringReturned, str)
		}
	}

	return
}

// ??????????????§??????????????????????????????????????????
func SplitStrStdin(delim string) (stringReturned []string) {
	// ???????????§1?????????
	stringInput := StrStdin()

	// ????????§??????
	// stringSplited := strings.Split(stringInput, delim)
	stringReturned = SplitWithoutEmpty(stringInput, delim)

	return
}

// ??????????????§??????????????´??°????????????????????????
func SplitIntStdin(delim string) (intSlices []int, err error) {
	// ??????????????????????????????
	stringSplited := SplitStrStdin(" ")

	// ??´??°?????????????????????
	for i := range stringSplited {
		var iparam int
		iparam, err = strconv.Atoi(stringSplited[i])
		if err != nil {
			return
		}
		intSlices = append(intSlices, iparam)
	}
	return
}

Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
a.cc:19:1: error: 'func' does not name a type
   19 | func main() {
      | ^~~~
a.cc:38:1: error: 'func' does not name a type
   38 | func StrStdin() (stringReturned string) {
      | ^~~~
a.cc:49:1: error: 'func' does not name a type
   49 | func IntStdin() (int, error) {
      | ^~~~
a.cc:55:1: error: 'func' does not name a type
   55 | func SplitWithoutEmpty(stringTargeted string, delim string) (stringReturned []string) {
      | ^~~~
a.cc:68:1: error: 'func' does not name a type
   68 | func SplitStrStdin(delim string) (stringReturned []string) {
      | ^~~~
a.cc:80:1: error: 'func' does not name a type
   80 | func SplitIntStdin(delim string) (intSlices []int, err error) {
      | ^~~~
Language: C++

#include <stdio.h>
#include <utility>

using namespace std::swap;

int main(){
    int x, y;
    scanf("%d %d", &x, &y);
    while(!(x == 0 && y == 0)){
        swap(x, y);
        printf("%d %d\n", x, y);
        scanf("%d %d", &x, &y);
    }
    return 0;
}

Compiler output:
a.cc:4:22: error: 'swap' is not a namespace-name
    4 | using namespace std::swap;
      |                      ^~~~
a.cc: In function 'int main()':
a.cc:10:9: error: 'swap' was not declared in this scope
   10 |         swap(x, y);
      |         ^~~~
a.cc:10:9: note: suggested alternatives:
In file included from /usr/include/c++/14/utility:69,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_pair.h:1106:5: note:   'std::swap'
 1106 |     swap(pair<_T1, _T2>&, pair<_T1, _T2>&) = delete;
      |     ^~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:61:
/usr/include/c++/14/bits/move.h:226:5: note:   'std::swap'
  226 |     swap(_Tp& __a, _Tp& __b)
      |     ^~~~
/usr/include/c++/14/bits/move.h:226:5: note:   'std::swap'
Language: C++

#include <iostream>
using namespace std;
int main(void){
    int x, y;
    while (1) {
        cin >> x >> y;
        if ( x == 0 && y == 0 ) { break; }
        cout << min(x,y) << " " << max(a,b) << endl;
    }
    return 0;
}



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

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

void swap(int * x, int * y) {
    int tmp;
    tmp = *x;
    *x = *y;
    *y = tmp;
    return; 
}

int main(void) {
  vector<int> x;
  vector<int> y;

  while() {
    int num1, num2
    cin >> num1 >> num2;
    if(num1 == 0 && num2 == 0) {
      break;
    } else {
      x.push_back(num1);
      y.push_back(num2);
    }
  }

  for(int i = 0; i < x.size(); i++) {
    if(x[i] > y[i]){
        swap(&x[i], &y[i]);
    }
    cout << x[i] << " " << y[i] << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: expected primary-expression before ')' token
   17 |   while() {
      |         ^
a.cc:19:5: error: expected initializer before 'cin'
   19 |     cin >> num1 >> num2;
      |     ^~~
a.cc:20:21: error: 'num2' was not declared in this scope; did you mean 'num1'?
   20 |     if(num1 == 0 && num2 == 0) {
      |                     ^~~~
      |                     num1
Language: C++

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

void swap(int * x, int * y) {
    int tmp;
    tmp = *x;
    *x = *y;
    *y = tmp;
    return; 
}

int main(void) {
  vector<int> x;
  vector<int> y;

  while() {
    int num1, num2;
    cin >> num1 >> num2;
    if(num1 == 0 && num2 == 0) {
      break;
    } else {
      x.push_back(num1);
      y.push_back(num2);
    }
  }

  for(int i = 0; i < x.size(); i++) {
    if(x[i] > y[i]){
        swap(&x[i], &y[i]);
    }
    cout << x[i] << " " << y[i] << endl;
  }
  return 0;
}#include <iostream>
#include <vector>
using namespace std;

void swap(int * x, int * y) {
    int tmp;
    tmp = *x;
    *x = *y;
    *y = tmp;
    return; 
}

int main(void) {
  vector<int> x;
  vector<int> y;

  while() {
    int num1, num2;
    cin >> num1 >> num2;
    if(num1 == 0 && num2 == 0) {
      break;
    } else {
      x.push_back(num1);
      y.push_back(num2);
    }
  }

  for(int i = 0; i < x.size(); i++) {
    if(x[i] > y[i]){
        swap(&x[i], &y[i]);
    }
    cout << x[i] << " " << y[i] << endl;
  }
  return 0;
}


Compiler output:
a.cc:35:2: error: stray '#' in program
   35 | }#include <iostream>
      |  ^
a.cc: In function 'int main()':
a.cc:17:9: error: expected primary-expression before ')' token
   17 |   while() {
      |         ^
a.cc: At global scope:
a.cc:35:3: error: 'include' does not name a type
   35 | }#include <iostream>
      |   ^~~~~~~
a.cc:39:6: error: redefinition of 'void swap(int*, int*)'
   39 | void swap(int * x, int * y) {
      |      ^~~~
a.cc:5:6: note: 'void swap(int*, int*)' previously defined here
    5 | void swap(int * x, int * y) {
      |      ^~~~
a.cc:47:5: error: redefinition of 'int main()'
   47 | int main(void) {
      |     ^~~~
a.cc:13:5: note: 'int main()' previously defined here
   13 | int main(void) {
      |     ^~~~
a.cc: In function 'int main()':
a.cc:51:9: error: expected primary-expression before ')' token
   51 |   while() {
      |         ^
Language: C++

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

void swap(int * x, int * y) {
    int tmp;
    tmp = *x;
    *x = *y;
    *y = tmp;
    return; 
}

int main(void) {
  vector<int> x;
  vector<int> y;

  while() {
    int num1, num2;
    cin >> num1 >> num2;
    if(num1 == 0 && num2 == 0) {
      break;
    } else {
      x.push_back(num1);
      y.push_back(num2);
    }
  }

  for(int i = 0; i < x.size(); i++) {
    if(x[i] > y[i]){
        swap(&x[i], &y[i]);
    }
    cout << x[i] << " " << y[i] << endl;
  }
  return 0;
}


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

#include <iostream>
using namespace std;

int main() {
int a, b;
cin >> a >> b;
if ( a < b) {
cout << a << " " << b <, endl;
} else {
cout << b << " " << a << endl;
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: expected primary-expression before ',' token
    8 | cout << a << " " << b <, endl;
      |                        ^
Language: C++

#include <iostream>
using namespace std;

int main() {
while (1) {
cin >> a >> b;
if (a == 0 && b == 0) {
break;
}
if ( a < b) {
cout << a << " " << b << endl;
} else {
cout << b << " " << a << endl;
}
}
return 0;
}


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

#include<iostream>
using namespaces std;
int main()
{int a,b;cin>>a>>b;while(a!=0 && b!=0){cout<<b<<" "<<a<<endl;cin>>a>>b;}}


Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespaces'
    2 | using namespaces std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:4:10: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 | {int a,b;cin>>a>>b;while(a!=0 && b!=0){cout<<b<<" "<<a<<endl;cin>>a>>b;}}
      |          ^~~
      |          std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:4:40: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    4 | {int a,b;cin>>a>>b;while(a!=0 && b!=0){cout<<b<<" "<<a<<endl;cin>>a>>b;}}
      |                                        ^~~~
      |                                        std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:4:57: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    4 | {int a,b;cin>>a>>b;while(a!=0 && b!=0){cout<<b<<" "<<a<<endl;cin>>a>>b;}}
      |                                                         ^~~~
      |                                                         std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;

int main() {
	int x, y, i;
	for (i = 0; i < 3000; i++) {
		cin >> x >> y;
		if (x == 0 && y == 0) {
			break
		else {
				if (x >= y) {
					cout << x << " " << y << "\n";
				}
				else {
					cout << y << " " << x << "\n";
				}
			}
		}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:30: error: expected ';' before 'else'
    9 |                         break
      |                              ^
      |                              ;
   10 |                 else {
      |                 ~~~~          
a.cc:10:17: error: expected '}' before 'else'
   10 |                 else {
      |                 ^~~~
a.cc:8:39: note: to match this '{'
    8 |                 if (x == 0 && y == 0) {
      |                                       ^
Language: C++

int main() {
	int x=1, y=1;
	while (1) {
		cin >> x >> y;
		if (x == 0 && y == 0) {
			break;
		}
		else {
			continue;
		}
		if (x >= y) {
					cout << y << " " << x << "\n";
				}
		else {
					cout << x << " " << y << "\n";
				}
		
		}
	return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:4:17: error: 'cin' was not declared in this scope
    4 |                 cin >> x >> y;
      |                 ^~~
a.cc:12:41: error: 'cout' was not declared in this scope
   12 |                                         cout << y << " " << x << "\n";
      |                                         ^~~~
a.cc:15:41: error: 'cout' was not declared in this scope
   15 |                                         cout << x << " " << y << "\n";
      |                                         ^~~~
a.cc:19:18: error: expected '}' at end of input
   19 |         return 0;
      |                  ^
a.cc:1:12: note: to match this '{'
    1 | int main() {
      |            ^
Language: C++

#include<iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:17:7: error: 'i' was not declared in this scope
   17 |       i++;
      |       ^