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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:31: error: expected ';' before 'if'
    4 |     scanf("%d %d %d",&a,&b,&c)
      |                               ^
      |                               ;
    5 |     if(a<b&&b<c){
      |     ~~                         
a.cc:8:5: error: 'else' without a previous 'if'
    8 |     else if(a<c&&c<b){
      |     ^~~~
Language: C++

#include<stdio.h>
int main(){
  int a[3], damy;
  for(int i= 0; i<3; i++){
  scanf("%d", a[i]);
  }
  for(i=0; i<3; i++){
    for(int j = 2; j>i; i--){
      if(a[j-1]>a[j]){
        damy = a[j];
        a[j] = a[j + 1];
        a[j + 1] = damy;
      }
    }
  }
  for(i=0; i<3; i++){
    printf("%d", a[i]);
  }
  return 0;
}       
      

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

using System;

namespace AOJ
{
    class Program
    {
        static void Main(string[] args)
        {

            string read = Console.ReadLine();
            var temp_string = read.Split(' ');
            int a = int.Parse(temp_string[0]), b = int.Parse(temp_string[1]), c = int.Parse(temp_string[2]);

            if(a<b)
            {
                int temp;
                temp = a;
                a = b;
                b = temp;

            }

            if (b < c)
            {
                int temp;
                temp = b;
                a = b;
                c = temp;

            }

            Console.WriteLine();
            Console.ReadLine();
        }
    }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:7:26: error: 'string' has not been declared
    7 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:7:35: error: expected ',' or '...' before 'args'
    7 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:35:6: error: expected ';' after class definition
   35 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void AOJ::Program::Main(int*)':
a.cc:10:13: error: 'string' was not declared in this scope
   10 |             string read = Console.ReadLine();
      |             ^~~~~~
a.cc:11:13: error: 'var' was not declared in this scope
   11 |             var temp_string = read.Split(' ');
      |             ^~~
a.cc:12:21: error: expected primary-expression before 'int'
   12 |             int a = int.Parse(temp_string[0]), b = int.Parse(temp_string[1]), c = int.Parse(temp_string[2]);
      |                     ^~~
a.cc:14:18: error: 'b' was not declared in this scope
   14 |             if(a<b)
      |                  ^
a.cc:23:17: error: 'b' was not declared in this scope
   23 |             if (b < c)
      |                 ^
a.cc:23:21: error: 'c' was not declared in this scope
   23 |             if (b < c)
      |                     ^
a.cc:32:13: error: 'Console' was not declared in this scope
   32 |             Console.WriteLine();
      |             ^~~~~~~
Language: C++

#include<iostream>

using namespace std;

int main(){
  int i,j,a,b,c,damy;
  
  cin >> a >> b >> c;
  if(a > b) {
    damy = a;
    a = b;
  if(a > c) {
    damy = a;
    a = c;
  if(b > c) {
    damy = b;
    c = b;

  cout << a << b << c << endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:12:13: note: to match this '{'
   12 |   if(a > c) {
      |             ^
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:9:13: note: to match this '{'
    9 |   if(a > b) {
      |             ^
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

# include <iostream>

int swap(int &A, int &B){
 int temp;
 temp = A;
 A = B;
 B = A;
}

int main(){
 int a, b, c;
 std::cin >> a >> b >> c;
 if( b < a) swap(a,b);
 if( b < c) swap(b,c)
 if( c < a) swap(a,c);

 std ::cout << a  << " " << b << " " << c << std::endl;
 return 0;
}

Compiler output:
a.cc: In function 'int swap(int&, int&)':
a.cc:8:1: warning: no return statement in function returning non-void [-Wreturn-type]
    8 | }
      | ^
a.cc: In function 'int main()':
a.cc:14:22: error: expected ';' before 'if'
   14 |  if( b < c) swap(b,c)
      |                      ^
      |                      ;
   15 |  if( c < a) swap(a,c);
      |  ~~
Language: C++

#include<algorithm>
 
using namespace std;
 
int main(){
int A[3];
 
cin >> A[0] >> A[1] >> A[2];
 
sort(A,A+2);
 
cout << A[0]  << " "<< A[1] << " " <<A[2] << endl;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: 'cin' was not declared in this scope
    8 | cin >> A[0] >> A[1] >> A[2];
      | ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<algorithm>
  +++ |+#include <iostream>
    2 | 
a.cc:12:1: error: 'cout' was not declared in this scope
   12 | cout << A[0]  << " "<< A[1] << " " <<A[2] << endl;
      | ^~~~
a.cc:12:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:46: error: 'endl' was not declared in this scope
   12 | cout << A[0]  << " "<< A[1] << " " <<A[2] << endl;
      |                                              ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<algorithm>
  +++ |+#include <ostream>
    2 |
Language: C++

#include<algorithm>
 
using namespace std;
 
int main(){
int A[3];
 
cin >> A[0] >> A[1] >> A[2];
 
sort(A,A+3);
 
cout << A[0]  << " "<< A[1] << " " <<A[2] << endl;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: 'cin' was not declared in this scope
    8 | cin >> A[0] >> A[1] >> A[2];
      | ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<algorithm>
  +++ |+#include <iostream>
    2 | 
a.cc:12:1: error: 'cout' was not declared in this scope
   12 | cout << A[0]  << " "<< A[1] << " " <<A[2] << endl;
      | ^~~~
a.cc:12:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:46: error: 'endl' was not declared in this scope
   12 | cout << A[0]  << " "<< A[1] << " " <<A[2] << endl;
      |                                              ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<algorithm>
  +++ |+#include <ostream>
    2 |
Language: C++

#include <iostream>
#define REP(i, a, n) for(int i = a; i < n; i++)
using namespace std;


int a[3];

int main(void) {
  REP(i, 0, 3) cin >> a[i];
  sort(a, a + 3);
  cout << a[0] << " " << a[1] << " " << a[2] << 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 + 3);
      |   ^~~~
      |   short
Language: C++

#include<stdio.h>
int main(void){
	int a, b, c, tmp,i;
	scanf_s("%d", &a);
	scanf_s("%d", &b);
	scanf_s("%d", &c);
	for (i = 1; i <= 3; i++){
		if (a > b){
			tmp = b;
			b = a;
			a = tmp;
		}
		else if (b > c){
			tmp = c;
			c = b;
			b = tmp;
		}
	}

	printf("%d %d %d", a, b, c);

	return 0;



}

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

#include <iostream>
using namespace std;

int main()
{
int a,b,c;
cin >> a,b,c;
if(a > b)
{
swap(a,b)
}
if(b > c)
{
swap(b,c)
}
if(a > b)
{
swap(a,b)
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: expected ';' before '}' token
   10 | swap(a,b)
      |          ^
      |          ;
   11 | }
      | ~         
a.cc:14:10: error: expected ';' before '}' token
   14 | swap(b,c)
      |          ^
      |          ;
   15 | }
      | ~         
a.cc:18:10: error: expected ';' before '}' token
   18 | swap(a,b)
      |          ^
      |          ;
   19 | }
      | ~
Language: C++

#include <stdio.h>

int main(void)
{
  int key, j, A[3];

  for (i = 0; i < 3; i++)
    scanf("%d",&A[i]);

  for (i = 1; i < 3; i++){
    key = A[i];
    j = i - 1;
    while ((j > 0) && (A[j] > key)){
      A[j+1] = A[j];
      j = j-1;
    }
    A[j+1] = key;
  }

  for (i = 0; i < 3; i++)
    printf("%d ", A[i]);
  printf("\n");

  return 0;
}

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

inl=map(int, raw_input().split())

inl.sort()

print inl[0],inl[1],inl[2]

Compiler output:
a.cc:1:1: error: 'inl' does not name a type; did you mean 'int'?
    1 | inl=map(int, raw_input().split())
      | ^~~
      | int
Language: C++

#include <stdio.h>

int main(){
int a[3],i,j,min=0,tmp=0;

???scanf("%d %d %d",a[0],a[1],a[2]);

???for(i=0;i<3;i++){
??????min=a[i];
??????for(j=i+1;j<2;j++){
?????????if(a[min]>a[j]){
????????????tmp=a[i];
????????????a[i]=a[j];
????????????a[j]=tmp;
??????}
???}
}
printf("%d %d %d\n",a[0],a[1],a[2]);

    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:1: error: expected primary-expression before '?' token
    6 | ???scanf("%d %d %d",a[0],a[1],a[2]);
      | ^
a.cc:6:2: error: expected primary-expression before '?' token
    6 | ???scanf("%d %d %d",a[0],a[1],a[2]);
      |  ^
a.cc:6:3: error: expected primary-expression before '?' token
    6 | ???scanf("%d %d %d",a[0],a[1],a[2]);
      |   ^
a.cc:6:36: error: expected ':' before ';' token
    6 | ???scanf("%d %d %d",a[0],a[1],a[2]);
      |                                    ^
      |                                    :
a.cc:6:36: error: expected primary-expression before ';' token
a.cc:6:36: error: expected ':' before ';' token
    6 | ???scanf("%d %d %d",a[0],a[1],a[2]);
      |                                    ^
      |                                    :
a.cc:6:36: error: expected primary-expression before ';' token
a.cc:6:36: error: expected ':' before ';' token
    6 | ???scanf("%d %d %d",a[0],a[1],a[2]);
      |                                    ^
      |                                    :
a.cc:6:36: error: expected primary-expression before ';' token
a.cc:8:1: error: expected primary-expression before '?' token
    8 | ???for(i=0;i<3;i++){
      | ^
a.cc:8:2: error: expected primary-expression before '?' token
    8 | ???for(i=0;i<3;i++){
      |  ^
a.cc:8:3: error: expected primary-expression before '?' token
    8 | ???for(i=0;i<3;i++){
      |   ^
a.cc:8:4: error: expected primary-expression before 'for'
    8 | ???for(i=0;i<3;i++){
      |    ^~~
a.cc:8:4: error: expected ':' before 'for'
    8 | ???for(i=0;i<3;i++){
      |    ^~~
      |    :
a.cc:8:4: error: expected primary-expression before 'for'
    8 | ???for(i=0;i<3;i++){
      |    ^~~
a.cc:8:4: error: expected ':' before 'for'
    8 | ???for(i=0;i<3;i++){
      |    ^~~
      |    :
a.cc:8:4: error: expected primary-expression before 'for'
    8 | ???for(i=0;i<3;i++){
      |    ^~~
a.cc:8:4: error: expected ':' before 'for'
    8 | ???for(i=0;i<3;i++){
      |    ^~~
      |    :
a.cc:8:4: error: expected primary-expression before 'for'
    8 | ???for(i=0;i<3;i++){
      |    ^~~
a.cc:8:19: error: expected ';' before ')' token
    8 | ???for(i=0;i<3;i++){
      |                   ^
      |                   ;
Language: C++

#include <stdio.h>

int main(){
int a[3],i,j,min=0,tmp=0;

???scanf("%d %d %d",&a[0],&a[1],&a[2]);

???for(i=0;i<3;i++){
??????min=a[i];
??????for(j=i+1;j<2;j++){
?????????if(a[min]>a[j]){
????????????tmp=a[i];
????????????a[i]=a[j];
????????????a[j]=tmp;
??????}
???}
}
printf("%d %d %d\n",a[0],a[1],a[2]);

    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:1: error: expected primary-expression before '?' token
    6 | ???scanf("%d %d %d",&a[0],&a[1],&a[2]);
      | ^
a.cc:6:2: error: expected primary-expression before '?' token
    6 | ???scanf("%d %d %d",&a[0],&a[1],&a[2]);
      |  ^
a.cc:6:3: error: expected primary-expression before '?' token
    6 | ???scanf("%d %d %d",&a[0],&a[1],&a[2]);
      |   ^
a.cc:6:39: error: expected ':' before ';' token
    6 | ???scanf("%d %d %d",&a[0],&a[1],&a[2]);
      |                                       ^
      |                                       :
a.cc:6:39: error: expected primary-expression before ';' token
a.cc:6:39: error: expected ':' before ';' token
    6 | ???scanf("%d %d %d",&a[0],&a[1],&a[2]);
      |                                       ^
      |                                       :
a.cc:6:39: error: expected primary-expression before ';' token
a.cc:6:39: error: expected ':' before ';' token
    6 | ???scanf("%d %d %d",&a[0],&a[1],&a[2]);
      |                                       ^
      |                                       :
a.cc:6:39: error: expected primary-expression before ';' token
a.cc:8:1: error: expected primary-expression before '?' token
    8 | ???for(i=0;i<3;i++){
      | ^
a.cc:8:2: error: expected primary-expression before '?' token
    8 | ???for(i=0;i<3;i++){
      |  ^
a.cc:8:3: error: expected primary-expression before '?' token
    8 | ???for(i=0;i<3;i++){
      |   ^
a.cc:8:4: error: expected primary-expression before 'for'
    8 | ???for(i=0;i<3;i++){
      |    ^~~
a.cc:8:4: error: expected ':' before 'for'
    8 | ???for(i=0;i<3;i++){
      |    ^~~
      |    :
a.cc:8:4: error: expected primary-expression before 'for'
    8 | ???for(i=0;i<3;i++){
      |    ^~~
a.cc:8:4: error: expected ':' before 'for'
    8 | ???for(i=0;i<3;i++){
      |    ^~~
      |    :
a.cc:8:4: error: expected primary-expression before 'for'
    8 | ???for(i=0;i<3;i++){
      |    ^~~
a.cc:8:4: error: expected ':' before 'for'
    8 | ???for(i=0;i<3;i++){
      |    ^~~
      |    :
a.cc:8:4: error: expected primary-expression before 'for'
    8 | ???for(i=0;i<3;i++){
      |    ^~~
a.cc:8:19: error: expected ';' before ')' token
    8 | ???for(i=0;i<3;i++){
      |                   ^
      |                   ;
Language: C++

#include <iostream>
#include <algorithm>
 
using namespace std;
 
int main()
{
array<int, 3> a;
 
cin >>a[0] >>a[1] >>a[2];

sort(a, a+3);

cout <<a[0] <<" " <<a[1] <<" " <<a[2] <<endl;
 
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: aggregate 'std::array<int, 3> a' has incomplete type and cannot be defined
    8 | array<int, 3> a;
      |               ^
a.cc:3:1: note: 'std::array' is defined in header '<array>'; this is probably fixable by adding '#include <array>'
    2 | #include <algorithm>
  +++ |+#include <array>
    3 |
Language: C++

//
// Created by tac on 2016/10/12.
//


#include <cstdlib>
#include <vector>
#include <iostream>

std::vector<int>& sort_vector(std::vector<int>& vec) {
    std::sort(vec.begin(), vec.end());
    return vec;
}

int main() {
    int a, b, c;
    std::cin >> a >> b >> c;
    std::vector<int> vec {a, b, c};
    sort_vector(vec);
    std::cout << vec[0] << " " << vec[1] << " " << vec[2] << std::endl;
    return EXIT_SUCCESS;
}

Compiler output:
a.cc: In function 'std::vector<int>& sort_vector(std::vector<int>&)':
a.cc:11:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   11 |     std::sort(vec.begin(), vec.end());
      |          ^~~~
      |          qsort
Language: C++

#include <stdio.h>

int main()
{
    int a,b,c;
    int t;
    while(!(a<b<c))){
        if(a<b){
            t=a;
            a=b;
            b=t;
        }
        if(b<c){
            t=b;
            b=c;
            c=t;
        }
    }
    printf("%d %d %d\n",a,b,c);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: expected primary-expression before ')' token
    7 |     while(!(a<b<c))){
      |                    ^
Language: C++

int main()
{
    int a,b,c;
    int t;
    while(!(a<b<c)){
        if(a<b){
            t=a;
            a=b;
            b=t;
        }
        if(b<c){
            t=b;
            b=c;
            c=t;
        }
    }
    printf("%d %d %d\n",a,b,c);
    return 0;
}

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

int main()
{
    int a,b,c;
    int t;
    scanf("%d %d %d",&a,&b,&c);
    while(!(a<b<c)){
        if(a<b){
            t=a;
            a=b;
            b=t;
        }
        if(b<c){
            t=b;
            b=c;
            c=t;
        }
    }
    printf("%d %d %d\n",a,b,c);
    return 0;
}

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

#include <stdio.h>

int main(void){

int a, b, c, x;

scanf("%d %d %d", &a, &b, &c);

if( a > b ){
x = a;
a = b;
b = x;
}
if( b > c ){
x = b;
b = c;
c = x;
}
if( a > c ){
x = a;
a = b;
b = x;
}
printf("%d %d %d" a, b, c);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:18: error: expected ')' before 'a'
   24 | printf("%d %d %d" a, b, c);
      |       ~          ^~
      |                  )
Language: C++

#include <stdio.h>

int main(void){

int a, b, c, x;

scanf("%d %d %d", &a, &b, &c);

if(a > b){
x = a;
a = b;
b = x;
}
if(b > c){
x = b;
b = c;
c = x;
}
if(a > c){
x = a;
a = b;
b = x;
}
printf("%d %d %d\n" a, b, c);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:20: error: expected ')' before 'a'
   24 | printf("%d %d %d\n" a, b, c);
      |       ~            ^~
      |                    )
Language: C++

#include <iostream>

using namespace std;

int main() {
  int a[3];
  for (i = 0; i < 3; i++) {
    cin << a[i]
  }

  sort(a, a + 3);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: 'i' was not declared in this scope
    7 |   for (i = 0; i < 3; i++) {
      |        ^
a.cc:11:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   11 |   sort(a, a + 3);
      |   ^~~~
      |   short
Language: C++

#include<iostream>
using namespace std;

int main(){
int a,b,c,v;
cin>>a>>b>>c;

v=b;
if(a>v){
b=a;
a=v;
}

v=c;
if(b>v)}
c=b;
if(c>v){
b=a;
a=v;
}
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:8: error: expected primary-expression before '}' token
   15 | if(b>v)}
      |        ^
a.cc: At global scope:
a.cc:16:1: error: 'c' does not name a type
   16 | c=b;
      | ^
a.cc:17:1: error: expected unqualified-id before 'if'
   17 | if(c>v){
      | ^~
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C++

#include<iostream>
using namespace std;

int main(){
int a,b,c,n;
cin>>a>>b>>c;

if(a>b){
n=a;
a=b;
b=n;
}
if(b>c){
n=b;
b=c;
c=n;
if(a>b){
n=a;
a=b;
b=n;
}
}

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

#include<cstdio>
int main(){
	int a,b,c;
	scanf("%d%d%d",&a,&b,&c);
	if(a<b&&b<c){
	    printf("%d %d %d\n",a,b,c);
    }
	if(a<c&&c<b){
		printf("%d %d %d\n",a,c,b);
	}
	if(b<a&&a<c){
		printf("%d %d %d\n",b,a,c);
	}
	if(b<c&&c<a){
		printf("%d %d %d\n",b,c,a);
	}
	if(c<a&&a<b){
		printf("%d %d %d\n",c,a,b);
	}
	else(c<b&&b<a){
		printf("%d %d %d\n",c,b,a);
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:23: error: expected ';' before '{' token
   20 |         else(c<b&&b<a){
      |                       ^
      |                       ;
Language: C++

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

int main() {
  vector<int> v;
  int tmp;
  for (int i=0; i<3; i++) {
    cin >> tmp;
    v.push_back(tmp);
  }
  sort(v.begin(), v.end());

  for (vector<int>::iterator it=v.begin(); it!=v.end(); ++it) {
    if (it != v.begin()) {
      cout << " ";
    }
    cout << *it;
  }
  cout << endl;
  return 0;
}

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

#include <stdio.h>
int void(){
  int a, b, c, x;
  scanf("%d %d %d", &a, &b, &c);
  if (a>b) x=a; a=b; b=x;
  if (b>c) x=b; b=c; c=x;
  if (a>c) x=c; c=a; a=c;

  printf("%d %d %d\n",a ,b, c);

  return 0;
}

Compiler output:
a.cc:2:10: error: expected unqualified-id before ')' token
    2 | int void(){
      |          ^
Language: C++

#include<stdio.h>

int main(void){
 int a ,b ,c;
 scanf("%d %d %d",&a ,&b ,&c);
 max=a;
  if(max<b){
   max=b;
   min=a;
  }
  else{
   max=a;
   min=b;
  }
  if(max<c){
   mid=max;
   max=c;
  }
  else if(min>c){
   mid=min;
   min=c;
  }
  else{
   mid=c;
  }

 printf("%d %d %d",min ,mid ,max);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:2: error: 'max' was not declared in this scope
    6 |  max=a;
      |  ^~~
a.cc:9:4: error: 'min' was not declared in this scope; did you mean 'main'?
    9 |    min=a;
      |    ^~~
      |    main
a.cc:13:4: error: 'min' was not declared in this scope; did you mean 'main'?
   13 |    min=b;
      |    ^~~
      |    main
a.cc:16:4: error: 'mid' was not declared in this scope
   16 |    mid=max;
      |    ^~~
a.cc:19:11: error: 'min' was not declared in this scope; did you mean 'main'?
   19 |   else if(min>c){
      |           ^~~
      |           main
a.cc:20:4: error: 'mid' was not declared in this scope
   20 |    mid=min;
      |    ^~~
a.cc:24:4: error: 'mid' was not declared in this scope
   24 |    mid=c;
      |    ^~~
a.cc:27:20: error: 'min' was not declared in this scope; did you mean 'main'?
   27 |  printf("%d %d %d",min ,mid ,max);
      |                    ^~~
      |                    main
a.cc:27:25: error: 'mid' was not declared in this scope
   27 |  printf("%d %d %d",min ,mid ,max);
      |                         ^~~
Language: C++

#include<stdio.h>

int main(){

	int a,b,c;

	scanf("%d %d %d",&a,&b,&c);

	if(a<b&&b<c){
		printf("%d %d %d\n",a,b,c);
	}else if(b<=a&&a=<c){
		printf("%d %d %d\n",b,a,c);
	}else if(c<=a&&a<=b){
		printf("%d %d %d\n",c,a,b);
	}else if(a<=c&&c<=b){
		printf("%d %d %d\n",a,c,b);
	}else if(b<=c&&c<=a){
		printf("%d %d %d\n",b,c,a);
	}else if(c<=b&&b<=a){
		printf("%d %d %d\n",c,b,a);
	}

	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:26: error: expected primary-expression before '<' token
   11 |         }else if(b<=a&&a=<c){
      |                          ^
Language: C++

#include<stdio.h>

int main()
{

   int a, b, c;
   scanf("%d %d %d", &a, &b, &c);

   if(a<b && b<c) printf("%d %d %d", a, b, c);
   else if(a<b && c<b && a<c) printf("%d %d %d", a, c, b);
   else if(a<b && c<b && c<a) printf("%d %d %d", c, a, b);
   else if(b<a && a<c) printf("%d %d %d", b, a, c);
   else if(b<a && c<a && b<c) printf("%d %d %d", b, c, a);
   else if(b<a && c<a && c<b) printf("%d %d %d", c, b, a);

   return 0;
}







   return 0;
}

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

#include<stdio.h>

int main (void) {
  int a, b, c, hantei, temp;
  scanf("%d %d %d", &a, &b, &c);

  do {
    hantei = 1;
    if (a > b) {
      temp = a;
      a = b;
      b = temp;
      hantei = 0
    }
    
    if (b > c) {
      temp = b;
      b = c;
      c = temp;
      hantei = 0;
    }
  } while (hantei == 0);

  print("%d %d %d\n", a, b, c);

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: expected ';' before '}' token
   13 |       hantei = 0
      |                 ^
      |                 ;
   14 |     }
      |     ~            
a.cc:24:3: error: 'print' was not declared in this scope; did you mean 'printf'?
   24 |   print("%d %d %d\n", a, b, c);
      |   ^~~~~
      |   printf
Language: C++

#include<stdio.h>

int main (void) {
  int a, b, c, hantei, temp;
  scanf("%d %d %d", &a, &b, &c);

  do {
    hantei = 1;
    if (a > b) {
      temp = a;
      a = b;
      b = temp;
      hantei = 0;
    }
    
    if (b > c) {
      temp = b;
      b = c;
      c = temp;
      hantei = 0;
    }
  } while (hantei == 0);

  print("%d %d %d\n", a, b, c);

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:3: error: 'print' was not declared in this scope; did you mean 'printf'?
   24 |   print("%d %d %d\n", a, b, c);
      |   ^~~~~
      |   printf
Language: C++

#include<stdio.h>
int main(void)
{
	int a[3],i,j,w;
	for(i=0;i<3;i++){
	    scanf("%d",&a[i]);
	}
	for(i=0;i<2;i++){
	    for(j=i+1;j<3;j++){
		    if(a[i]>a[j]){
			    w=a[i];
				a[i]=a[j];
				a[j]=w;
			}
		}
	}
	for(i=0;i<3;i++){
	    if(i==2){
		    printf("%d",a[i])
		}
		else{
	    printf("%d ",a[i]);
	    }
	}
	printf("\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:38: error: expected ';' before '}' token
   19 |                     printf("%d",a[i])
      |                                      ^
      |                                      ;
   20 |                 }
      |                 ~
Language: C++

#include <stdio.h>

int main() {
 int a,b,c,x,y,z;

 scanf ("%d %d %d", &a, &b, &c);


 if (a > b) {
	
    x = a;
    a = b;
    b = x;

}

 if (b > c) {
	y = b;
	b = c;
	c = y;
}
 if (a > b) {
	z = a;
	a = b;
	b = z;
}


 printf("%d %d %d\n", min, mid, max);
 return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:23: error: 'min' was not declared in this scope; did you mean 'main'?
   29 |  printf("%d %d %d\n", min, mid, max);
      |                       ^~~
      |                       main
a.cc:29:28: error: 'mid' was not declared in this scope
   29 |  printf("%d %d %d\n", min, mid, max);
      |                            ^~~
a.cc:29:33: error: 'max' was not declared in this scope
   29 |  printf("%d %d %d\n", min, mid, max);
      |                                 ^~~
Language: C++


#include "stdafx.h"
#pragma warning(disable:4996)

int main()
{
	int num[3];
	int i,j,st;
	scanf("%d%d%d", &num[0], &num[1], &num[2]);
	for (i = 0; i < 2; i++) {
		for (j = 0; j < 2-i; j++) {
			if (num[j] >= num[j + 1]) {
				st = num[j + 1];
				num[j + 1] = num[j];
				num[j] = st;
			}
		}
	}
	for (i = 0; i < 3; i++) {
		printf("%d ",num[i]);
	}
	return 0;
}

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

#include <iostream>
using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
	int a,b,c;
	cin>>a>>b>>c;
	int d[3];
	d[0] = a;
	d[1] = b;
	d[2] = c;
	int temp;
	for(int i = 0; i < 2; i++){
		for(int j = 0; j <= i; j++){
			if(d[j] > d[j+1]){
				temp = d[j];
				d[j] = d[j+1];
				d[j+1] = temp;
			}
		}
	}
	cout<<d[0]<<" "<<d[1]<<" "<<d[2]<<endl;
	

	return 0;
}

Compiler output:
a.cc:4:22: error: '_TCHAR' has not been declared
    4 | int _tmain(int argc, _TCHAR* argv[])
      |                      ^~~~~~
Language: C++

#include <iostream>
#include <vector>
using namespace std;
int main(void) {
    int n = 3;
    vector<int> A(n);
    for(int i=0; i<n; i++) cin >> A[i];
    sort(A.begin(), A.end());
    printf("%d %d %d\n", A[0], A[1], A[2]);
    return 0;
}

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

#include <stdio.h>
#include <iostream>
#include <vector>
using namespace std;
int main(void) {
    int n = 3;
    vector<int> A(n);
    for(int i=0; i<n; i++) cin >> A[i];
    sort(A.begin(), A.end());
    printf("%d %d %d\n", A[0], A[1], A[2]);
    return 0;
}

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

#include <iostream>
#include <vector>
using namespace std;
int main(void) {
    int n = 3;
    vector<int> A(n);
    for(int i=0; i<n; i++) cin >> A[i];
    sort(A.begin(), A.end());
    cout << A[0] << " " << A[1] << " " << A[2] << endl;
    return 0;
}

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

#include <iostream>
#include <vector>
using namespace std;
int main(void) {
    int n = 3;
    vector<int> A(n);
    for(int i=0; i<n; i++) cin >> A[i];
    std::sort(A.begin(), A.end());
    cout << A[0] << " " << A[1] << " " << A[2] << endl;
    return 0;
}

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

PROGRAM  Order
   IMPLICIT  NONE

   INTEGER  :: a, b, c

   READ(*,*)  a, b, c

   IF (a < b) THEN                 ! a < b here
      IF (a < c) THEN              !   a < c     : a the smallest
         IF (b < c) THEN           !      b < c  : a < b < c
            WRITE(*,*)  a, b, c
         ELSE                      !      c <= b : a < c <= b
            WRITE(*,*)  a, c, b
         END IF
      ELSE                         !   a >= c    : c <= a < b
         WRITE(*,*) c, a, b
      END IF
   ELSE                            ! b <= a here
      IF (b < c) THEN              !   b < c     : b the smallest
         IF (a < c) THEN           !     a < c   : b <= a < c
            WRITE(*,*)  b, a, c
         ELSE                      !     a >= c  : b < c <= a
            WRITE(*,*)  b, c, a
         END IF
      ELSE                         !   c <= b    : c <= b <= a
         WRITE(*,*)  c, b, a
      END IF
   END IF

END PROGRAM  Order

Compiler output:
a.cc:1:1: error: 'PROGRAM' does not name a type
    1 | PROGRAM  Order
      | ^~~~~~~
Language: C++

PROGRAM  Order
   IMPLICIT  NONE

   INTEGER  :: a, b, c

   READ(*,*)  a, b, c

   IF (a < b) THEN
      IF (a < c) THEN
         IF (b < c) THEN
            WRITE(*,*)  a, b, c
         ELSE
            WRITE(*,*)  a, c, b
         END IF
      ELSE
         WRITE(*,*) c, a, b
      END IF
   ELSE
      IF (b < c) THEN
         IF (a < c) THEN
            WRITE(*,*)  b, a, c
         ELSE
            WRITE(*,*)  b, c, a
         END IF
      ELSE
         WRITE(*,*)  c, b, a
      END IF
   END IF

END PROGRAM  Order

Compiler output:
a.cc:1:1: error: 'PROGRAM' does not name a type
    1 | PROGRAM  Order
      | ^~~~~~~
Language: C++

PROGRAM  Order
   IMPLICIT  NONE

   INTEGER  :: a,b,c

   READ(*,*)  a,b,c

   IF (a<b) THEN
      IF (a<c) THEN
         IF (b<c) THEN
            WRITE(*,*)  a,b,c
         ELSE
            WRITE(*,*)  a,c,b
         END IF
      ELSE
         WRITE(*,*) c,a,b
      END IF
   ELSE
      IF (b<c) THEN
         IF (a<c) THEN
            WRITE(*,*)  b,a,c
         ELSE
            WRITE(*,*)  b,c,a
         END IF
      ELSE
         WRITE(*,*)  c, b, a
      END IF
   END IF

END PROGRAM  Order

Compiler output:
a.cc:1:1: error: 'PROGRAM' does not name a type
    1 | PROGRAM  Order
      | ^~~~~~~
Language: C++

#include<iostream>
#include<cstdio>
using namespace std ;
int main()  {
  int a,b,c;

 cin>>a>>b>>c;
 
 if(a>b){
   swap(a,b);
    }
    if(b>c){
      swap(b,c);
    }
    if(a>b){
      swap(a,b);
    }
    cout<<a<<b<<c<<endl;
  }
  return 0;
}

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

#include <iostream>
using namespace std;
int main()
{
  int a,b,c,d;
  cin >> a >> b >> c;
  if (a>b) {
    d=a;
    a=b;
    b=d;
  else {}  /* code */
  }
  if (b>c) {
    d=b;
    b=c;
    c=d;
    /* code */
  }
  else{}
  if (a>b) {
    d=a;
    a=b;
    b=d;
    /* code */
  }
  else{}
  cout <<"a"<<" "<<"b"<<" "<<"c"<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: expected '}' before 'else'
   11 |   else {}  /* code */
      |   ^~~~
a.cc:7:12: note: to match this '{'
    7 |   if (a>b) {
      |            ^
a.cc: At global scope:
a.cc:13:3: error: expected unqualified-id before 'if'
   13 |   if (b>c) {
      |   ^~
a.cc:19:3: error: expected unqualified-id before 'else'
   19 |   else{}
      |   ^~~~
a.cc:20:3: error: expected unqualified-id before 'if'
   20 |   if (a>b) {
      |   ^~
a.cc:26:3: error: expected unqualified-id before 'else'
   26 |   else{}
      |   ^~~~
a.cc:27:3: error: 'cout' does not name a type
   27 |   cout <<"a"<<" "<<"b"<<" "<<"c"<<endl;
      |   ^~~~
a.cc:28:3: error: expected unqualified-id before 'return'
   28 |   return 0;
      |   ^~~~~~
a.cc:29:1: error: expected declaration before '}' token
   29 | }
      | ^
Language: C++

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

cin>>a>>b>>c;

if(a>b&&b>c){
cout<<c<<b<<a<<endl;
}else if(b>a&&a>>c){
cout<<c<<a<<b<<endl;
}else if(c>a&&a>>b){
cout<<b<<a<<c<<endl;
}else if(a>c&&c>>b){
cout<<b<<c<<a<<endl;
}else if(a>b&&b>>c){
cout<<c<<b<<a<<endl;
}else if(b>a&&c>>a){
cout<<a<<c<<b<<endl;

}

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

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

cin>>a>>b>>c;

if(c>b&&b>a){
cout<<a<<" "<<b<<" "<<c<<endl;
}else if(b>a&&a>>c){
cout<<c<<" "<<a<<" "<<b<<endl;
}else if(c>a&&a>>b){
cout<<b<<" "<<a<<" "<<c<<endl;
}else if(a>c&&c>>b){
cout<<b<<" "<<c<<" "<<a<<endl;
}else if(a>b&&b>>c){
cout<<c<<" "<<b<<" "<<a<<endl;
}else if(b>c&&c>>a){
cout<<a<<" "<<c<<" "<<b<<endl;
}else
{
cout<<" "<<endl:
}

return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:16: error: expected ';' before ':' token
   22 | cout<<" "<<endl:
      |                ^
      |                ;
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;main(){int a[3],i=0;while(i<3){cin>>a[i++];)i=0;sort(a.begin(),a.end());while(i<3){cout<<a[i];}cout<<endl;

Compiler output:
a.cc:3:21: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | using namespace std;main(){int a[3],i=0;while(i<3){cin>>a[i++];)i=0;sort(a.begin(),a.end());while(i<3){cout<<a[i];}cout<<endl;
      |                     ^~~~
a.cc: In function 'int main()':
a.cc:3:64: error: expected primary-expression before ')' token
    3 | using namespace std;main(){int a[3],i=0;while(i<3){cin>>a[i++];)i=0;sort(a.begin(),a.end());while(i<3){cout<<a[i];}cout<<endl;
      |                                                                ^
a.cc:3:76: error: request for member 'begin' in 'a', which is of non-class type 'int [3]'
    3 | using namespace std;main(){int a[3],i=0;while(i<3){cin>>a[i++];)i=0;sort(a.begin(),a.end());while(i<3){cout<<a[i];}cout<<endl;
      |                                                                            ^~~~~
a.cc:3:86: error: request for member 'end' in 'a', which is of non-class type 'int [3]'
    3 | using namespace std;main(){int a[3],i=0;while(i<3){cin>>a[i++];)i=0;sort(a.begin(),a.end());while(i<3){cout<<a[i];}cout<<endl;
      |                                                                                      ^~~
a.cc:3:127: error: expected '}' at end of input
    3 | using namespace std;main(){int a[3],i=0;while(i<3){cin>>a[i++];)i=0;sort(a.begin(),a.end());while(i<3){cout<<a[i];}cout<<endl;
      |                                                   ~                                                                           ^
a.cc:3:127: error: expected '}' at end of input
    3 | using namespace std;main(){int a[3],i=0;while(i<3){cin>>a[i++];)i=0;sort(a.begin(),a.end());while(i<3){cout<<a[i];}cout<<endl;
      |                           ~                                                                                                   ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;main(){int a[3],i=0;while(i<3){cin>>a[i++];)i=0;sort(a,a+3);while(i<3){cout<<a[i]<<" ";}cout<<endl;

Compiler output:
a.cc:3:21: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | using namespace std;main(){int a[3],i=0;while(i<3){cin>>a[i++];)i=0;sort(a,a+3);while(i<3){cout<<a[i]<<" ";}cout<<endl;
      |                     ^~~~
a.cc: In function 'int main()':
a.cc:3:64: error: expected primary-expression before ')' token
    3 | using namespace std;main(){int a[3],i=0;while(i<3){cin>>a[i++];)i=0;sort(a,a+3);while(i<3){cout<<a[i]<<" ";}cout<<endl;
      |                                                                ^
a.cc:3:120: error: expected '}' at end of input
    3 | using namespace std;main(){int a[3],i=0;while(i<3){cin>>a[i++];)i=0;sort(a,a+3);while(i<3){cout<<a[i]<<" ";}cout<<endl;
      |                                                   ~                                                                    ^
a.cc:3:120: error: expected '}' at end of input
    3 | using namespace std;main(){int a[3],i=0;while(i<3){cin>>a[i++];)i=0;sort(a,a+3);while(i<3){cout<<a[i]<<" ";}cout<<endl;
      |                           ~                                                                                            ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;main(){int a[3],i=0;while(i<3){cin>>a[i++];)i=0;sort(a,a+3);while(i<3)(cout<<a[i]<<" ";)cout<<endl;}

Compiler output:
a.cc:3:21: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | using namespace std;main(){int a[3],i=0;while(i<3){cin>>a[i++];)i=0;sort(a,a+3);while(i<3)(cout<<a[i]<<" ";)cout<<endl;}
      |                     ^~~~
a.cc: In function 'int main()':
a.cc:3:64: error: expected primary-expression before ')' token
    3 | using namespace std;main(){int a[3],i=0;while(i<3){cin>>a[i++];)i=0;sort(a,a+3);while(i<3)(cout<<a[i]<<" ";)cout<<endl;}
      |                                                                ^
a.cc:3:107: error: expected ')' before ';' token
    3 | using namespace std;main(){int a[3],i=0;while(i<3){cin>>a[i++];)i=0;sort(a,a+3);while(i<3)(cout<<a[i]<<" ";)cout<<endl;}
      |                                                                                           ~               ^
      |                                                                                                           )
a.cc:3:108: error: expected primary-expression before ')' token
    3 | using namespace std;main(){int a[3],i=0;while(i<3){cin>>a[i++];)i=0;sort(a,a+3);while(i<3)(cout<<a[i]<<" ";)cout<<endl;}
      |                                                                                                            ^
a.cc:3:121: error: expected '}' at end of input
    3 | using namespace std;main(){int a[3],i=0;while(i<3){cin>>a[i++];)i=0;sort(a,a+3);while(i<3)(cout<<a[i]<<" ";)cout<<endl;}
      |                           ~                                                                                             ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;main(){int a[3],i=0;while(i<3)(cin>>a[i++];)i=0;sort(a,a+3);while(i<3)(cout<<a[i]<<" ";)cout<<endl;}

Compiler output:
a.cc:3:21: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | using namespace std;main(){int a[3],i=0;while(i<3)(cin>>a[i++];)i=0;sort(a,a+3);while(i<3)(cout<<a[i]<<" ";)cout<<endl;}
      |                     ^~~~
a.cc: In function 'int main()':
a.cc:3:63: error: expected ')' before ';' token
    3 | using namespace std;main(){int a[3],i=0;while(i<3)(cin>>a[i++];)i=0;sort(a,a+3);while(i<3)(cout<<a[i]<<" ";)cout<<endl;}
      |                                                   ~           ^
      |                                                               )
a.cc:3:64: error: expected primary-expression before ')' token
    3 | using namespace std;main(){int a[3],i=0;while(i<3)(cin>>a[i++];)i=0;sort(a,a+3);while(i<3)(cout<<a[i]<<" ";)cout<<endl;}
      |                                                                ^
a.cc:3:107: error: expected ')' before ';' token
    3 | using namespace std;main(){int a[3],i=0;while(i<3)(cin>>a[i++];)i=0;sort(a,a+3);while(i<3)(cout<<a[i]<<" ";)cout<<endl;}
      |                                                                                           ~               ^
      |                                                                                                           )
a.cc:3:108: error: expected primary-expression before ')' token
    3 | using namespace std;main(){int a[3],i=0;while(i<3)(cin>>a[i++];)i=0;sort(a,a+3);while(i<3)(cout<<a[i]<<" ";)cout<<endl;}
      |                                                                                                            ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;main(){int a[3],i=0;while(i<3){cin>>a[i++];}i=0;sort(a,a+3);while(i<3){if(i==2)cout<<a[i++];elsecout<<a[i++]<<" ";}}

Compiler output:
a.cc:3:21: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | using namespace std;main(){int a[3],i=0;while(i<3){cin>>a[i++];}i=0;sort(a,a+3);while(i<3){if(i==2)cout<<a[i++];elsecout<<a[i++]<<" ";}}
      |                     ^~~~
a.cc: In function 'int main()':
a.cc:3:113: error: 'elsecout' was not declared in this scope
    3 | using namespace std;main(){int a[3],i=0;while(i<3){cin>>a[i++];}i=0;sort(a,a+3);while(i<3){if(i==2)cout<<a[i++];elsecout<<a[i++]<<" ";}}
      |                                                                                                                 ^~~~~~~~
Language: C++

#include <stdio.h>

int main()


{


int a,b,c,x,y,z;


scanf("%d %d %d"<&a,&b,&c,);


if(a>b){


x=a;


a=b;


b=x;


}


if(b>c){


y=b;


b=c;


c=y;


}


if(a>b){


z=a;


a=b;


b=z;


}


printf("%d %d %d\n",a,b,c);


return 0;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: comparison between distinct pointer types 'const char*' and 'int*' lacks a cast
   12 | scanf("%d %d %d"<&a,&b,&c,);
      |       ~~~~~~~~~~^~~
a.cc:12:27: error: expected primary-expression before ')' token
   12 | scanf("%d %d %d"<&a,&b,&c,);
      |                           ^
Language: C++

#include <stdio.h>

int main()


{


int a,b,c,x,y,z;


scanf("%d%d%d"<&a,&b,&c,);


if(a > b){


x = a;


a = b;


b = x;


}


if(b > c){


y = b;


b = c;


c = y;


}


if(a > b){


z = a;


a = b;


b = z;


}


printf("%d %d %d\n",a,b,c);


return 0;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: comparison between distinct pointer types 'const char*' and 'int*' lacks a cast
   12 | scanf("%d%d%d"<&a,&b,&c,);
      |       ~~~~~~~~^~~
a.cc:12:25: error: expected primary-expression before ')' token
   12 | scanf("%d%d%d"<&a,&b,&c,);
      |                         ^
Language: C++

#include <stdio.h>

int main()


{


int a,b,c,x,y,z;


scanf("%d%d%d"<&a,&b,&c,);


if(a > b){


x = a;


a = b;


b = x;


}


if(b > c){


y = b;


b = c;


c = y;


}


if(c > a){


z = c;


c = a;


a = z;


}


printf("%d %d %d\n",a,b,c);


return 0;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: comparison between distinct pointer types 'const char*' and 'int*' lacks a cast
   12 | scanf("%d%d%d"<&a,&b,&c,);
      |       ~~~~~~~~^~~
a.cc:12:25: error: expected primary-expression before ')' token
   12 | scanf("%d%d%d"<&a,&b,&c,);
      |                         ^
Language: C++

#include <stdio.h>

int main()


{


int a,b,c,x,y,z;


scanf("%d%d%d",&a,&b,&c,);


if(a > b){


x = a;


a = b;


b = x;


}


if(b > c){


y = b;


b = c;


c = y;


}


if(c > a){


z = c;


c = a;


a = z;


}


printf("%d %d %d\n",a,b,c);


return 0;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:25: error: expected primary-expression before ')' token
   12 | scanf("%d%d%d",&a,&b,&c,);
      |                         ^
Language: C++

include <stdio.h>

int main()


{


int a,b,c,x,y,z;


scanf("%d%d%d",&a,&b,&c,);


if(a > b){


x = a;


a = b;


b = x;


}


if(b > c){


y = b;


b = c;


c = y;


}


if(a > b){


z = a;


b = z;


a = b;


}


printf("%d %d %d\n",a,b,c);


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,c,x,y,z;


scanf("%d%d%d",&a,&b,&c,);


if(a > b){


x = a;


a = b;


b = x;


}


if(b > c){


y = b;


b = c;


c = y;


}


if(a > b){


z = a;


b = z;


a = b;


}


printf("%d %d %d\n",a,b,c);


return 0;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:25: error: expected primary-expression before ')' token
   12 | scanf("%d%d%d",&a,&b,&c,);
      |                         ^
Language: C++

#include  <iostream>
using namespace std;

int main(){
  int a, b, c;;
  cin >> a >> b >> c;

  if (a > b) {a = t; a = b; b = a;}
  if (b > c) {b = t; b = c; c = t;}
  if (a > b) {a = t; a = b; b = a;}

  cout << a << " " << b << " " << c << endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: 't' was not declared in this scope
    8 |   if (a > b) {a = t; a = b; b = a;}
      |                   ^
a.cc:9:19: error: 't' was not declared in this scope
    9 |   if (b > c) {b = t; b = c; c = t;}
      |                   ^
a.cc:10:19: error: 't' was not declared in this scope
   10 |   if (a > b) {a = t; a = b; b = a;}
      |                   ^
Language: C++

#include <iostream> 

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

void swap(int &a, int &b) {
int swap = *a;
*a = *b;
*b = swap;
}

void sort(int a, int b, int c) {
if (a > b) {
swap(a,b);
}
if(b > c) {
swap(b,c);
}
if (a > b) {
swap(a,b);
}
}

int main(void) {
int a;
int b;
int c;
cin >> a >> b >> c;
sort(a,b,c);
}

Compiler output:
a.cc: In function 'void swap(int&, int&)':
a.cc:8:12: error: invalid type argument of unary '*' (have 'int')
    8 | int swap = *a;
      |            ^~
a.cc:9:1: error: invalid type argument of unary '*' (have 'int')
    9 | *a = *b;
      | ^~
a.cc:9:6: error: invalid type argument of unary '*' (have 'int')
    9 | *a = *b;
      |      ^~
a.cc:10:1: error: invalid type argument of unary '*' (have 'int')
   10 | *b = swap;
      | ^~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int i,j,k;
  cin >> i >> j >> k;
  if (i > j) {
    tmp = i;
    i = j;
    j = tmp;
  }
  if (j > k) {
    tmp = j;
    j = k;
    k = tmp;
  }
  if (i > j) {
    tmp = i;
    i = j;
    j = tmp;
  }
  cout << i << " " << j << " " << k << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'tmp' was not declared in this scope; did you mean 'tm'?
    8 |     tmp = i;
      |     ^~~
      |     tm
a.cc:13:5: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   13 |     tmp = j;
      |     ^~~
      |     tm
a.cc:18:5: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   18 |     tmp = i;
      |     ^~~
      |     tm