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<b && 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 if(c<b && b<a){
		printf("%d %d %d\n",c b a);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:38: error: expected ')' before 'b'
    6 |                 printf("%d %d %d\n",a b c);
      |                       ~              ^~
      |                                      )
main.c:9:38: error: expected ')' before 'c'
    9 |                 printf("%d %d %d\n",a c b);
      |                       ~              ^~
      |                                      )
main.c:12:38: error: expected ')' before 'a'
   12 |                 printf("%d %d %d\n",b a c);
      |                       ~              ^~
      |                                      )
main.c:15:38: error: expected ')' before 'c'
   15 |                 printf("%d %d %d\n",b c a);
      |                       ~              ^~
      |                                      )
main.c:18:38: error: expected ')' before 'a'
   18 |                 printf("%d %d %d\n",c a b);
      |                       ~              ^~
      |                                      )
main.c:21:38: error: expected ')' before 'b'
   21 |                 printf("%d %d %d\n",c b a);
      |                       ~              ^~
      |                                      )
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:3:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 's'
    3 |         int a,b,c s;
      |                   ^
main.c:4:33: error: 'c' undeclared (first use in this function)
    4 |         scanf("%d %d %d",&a,&b,&c);
      |                                 ^
main.c:4:33: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:11: error: 's' undeclared (first use in this function)
    6 |           s=c;
      |           ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:21:1: error: expected expression before '?' token
   21 | ???return 0;
      | ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:15:20: error: array subscript is not an integer
   15 |               min=a[a];
      |                    ^
Language: C

#include <stdio.h>

int main( void ){
    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 =< b && b =< a ){
        printf( "%d %d %d\n",c,b,a );
    } else {
         printf( "%d %d %d\n",c,a,b );       
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:13: error: expected expression before '<' token
    6 |     if ( a =< b && b =< c ){
      |             ^
main.c:8:20: error: expected expression before '<' token
    8 |     } else if ( a =< c && c =< b ){
      |                    ^
main.c:10:20: error: expected expression before '<' token
   10 |     } else if ( b =< a && a =< c ){
      |                    ^
main.c:12:20: error: expected expression before '<' token
   12 |     } else if ( b =< c && c =< a ){
      |                    ^
main.c:14:20: error: expected expression before '<' token
   14 |     } else if ( c =< b && b =< a ){
      |                    ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:3:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 |         scanf("%d %d %d",&a,&b,&c);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(){
main.c:3:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 |         scanf("%d %d %d",&a,&b,&c);
      |         ^~~~~
main.c:3:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    6 |                 printf("%d ",a);
      |                 ^~~~~~
main.c:6:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:6:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:10:46: error: expected ';' before '}' token
   10 |                         printf("%d %d\n",c,b)
      |                                              ^
      |                                              ;
   11 |         }else if(b>c){
      |         ~                                     
main.c:11:10: error: expected '}' before 'else'
   11 |         }else if(b>c){
      |          ^~~~
main.c:12:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   12 |                 printf("%d ",b);
      |                 ^~~~~~
main.c:12:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:17:10: error: expected '}' before 'else'
   17 |         }else{
      |          ^~~~
main.c:18:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   18 |                 printf("%d ",c);
      |                 ^~~~~~
main.c:18:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:25:1: error: expected declaration or statement at end of input
   25 | }
      | ^
main.c:25:1: error: expected declaration or statement at end of input
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:3:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 | scanf("%d %d %d",&a,&b,&c);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(){
main.c:3:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 | scanf("%d %d %d",&a,&b,&c);
      | ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    6 | printf("%d ",a);
      | ^~~~~~
main.c:6:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:6:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:10:22: error: expected ';' before '}' token
   10 | printf("%d %d\n",c,b)
      |                      ^
      |                      ;
   11 | }else if(b>c){
      | ~                     
main.c:11:2: error: expected '}' before 'else'
   11 | }else if(b>c){
      |  ^~~~
main.c:12:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   12 | printf("%d ",b);
      | ^~~~~~
main.c:12:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:17:2: error: expected '}' before 'else'
   17 | }else{
      |  ^~~~
main.c:18:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   18 | printf("%d ",c);
      | ^~~~~~
main.c:18:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:25:1: error: expected declaration or statement at end of input
   25 | }
      | ^
main.c:25:1: error: expected declaration or statement at end of input
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:3:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 | scanf("%d %d %d",&a,&b,&c);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(){
main.c:3:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 | scanf("%d %d %d",&a,&b,&c);
      | ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    6 | printf("%d ",a);
      | ^~~~~~
main.c:6:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:6:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:11:2: error: expected '}' before 'else'
   11 | }else if(b>c){
      |  ^~~~
main.c:12:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   12 | printf("%d ",b);
      | ^~~~~~
main.c:12:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:17:2: error: expected '}' before 'else'
   17 | }else{
      |  ^~~~
main.c:18:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   18 | printf("%d ",c);
      | ^~~~~~
main.c:18:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:25:1: error: expected declaration or statement at end of input
   25 | }
      | ^
main.c:25:1: error: expected declaration or statement at end of input
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:3:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 | scanf("%d %d %d",&a,&b,&c);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(){
main.c:3:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 | scanf("%d %d %d",&a,&b,&c);
      | ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    7 | printf("%d %d %d\n",a,b,c);
      | ^~~~~~
main.c:7:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:7:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:9:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    9 | printf("%d %d %d\n",a,c,b);
      | ^~~~~~
main.c:9:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:10:2: error: expected '}' before 'else'
   10 | }else if(b>c){
      |  ^~~~
main.c:12:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   12 | printf("%d %d %d\n",b,a,c);
      | ^~~~~~
main.c:12:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   14 | printf("%d %d %d\n",b,c,a);
      | ^~~~~~
main.c:14:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:15:2: error: expected '}' before 'else'
   15 | }else{
      |  ^~~~
main.c:17:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   17 | printf("%d %d %d\n",c,a,b);
      | ^~~~~~
main.c:17:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:19:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   19 | printf("%d %d %d\n",c,b,a);
      | ^~~~~~
main.c:19:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:22:1: error: expected declaration or statement at end of input
   22 | }
      | ^
main.c:22:1: error: expected declaration or statement at end of input
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:4:2: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |  scanf("%d %d %d",&a,&b,&c);
      |  ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main()
main.c:4:2: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |  scanf("%d %d %d",&a,&b,&c);
      |  ^~~~~
main.c:4:2: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:11:4: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   11 |    printf("%d %d %d\n",a,b,c);
      |    ^~~~~~
main.c:11:4: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:11:4: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:11:4: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:4: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   14 |    printf("%d %d %d\n",a,c,b);
      |    ^~~~~~
main.c:14:4: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:15:5: error: expected '}' before 'else'
   15 |    }else if(b>c)
      |     ^~~~
main.c:19:6: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   19 |      printf("%d %d %d\n",b,a,c);
      |      ^~~~~~
main.c:19:6: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:22:6: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   22 |      printf("%d %d %d\n",b,c,a);
      |      ^~~~~~
main.c:22:6: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:23:6: error: expected '}' before 'else'
   23 |     }else
      |      ^~~~
main.c:27:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   27 |       printf("%d %d %d\n",c,a,b);
      |       ^~~~~~
main.c:27:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:30:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   30 |       printf("%d %d %d\n",c,b,a);
      |       ^~~~~~
main.c:30:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c: At top level:
main.c:35:2: error: expected identifier or '(' before '}' token
   35 |  }
      |  ^
main.c:36:2: error: expected identifier or '(' before 'return'
   36 |  return 0;
      |  ^~~~~~
main.c:37:1: error: expected identifier or '(' before '}' token
   37 | }
      | ^
Language: C

int main(void){
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
if(a<b||a<c)
 {
  a(a,b,c);
 }else if(b<c)
 {
  b(a,b,c);
 }else
  c(a,b,c);
 }
return 0;
}

int a(int a,b,c){
if(b<c)
 {
  printf("%d %d %d\n",a,b,c);
 }else
 {
  printf("%d %d %d\n",a,c,b);
 }
return 0;
}

int b(int a,b,c){
if(a<c)
 {
  printf("%d %d %d\n",b,a,c);
 }else
 {
  printf("%d %d %d\n",b,c,a);
 }
return 0;
}

int c(int a,b,c){
if(a<b)
 {
  printf("%d %d %d\n",c,a,b);
 }else
 {
  printf("%d %d %d\n",c,b,a);
 }
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 | scanf("%d %d %d",&a,&b,&c);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:3:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 | scanf("%d %d %d",&a,&b,&c);
      | ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:3: error: called object 'a' is not a function or function pointer
    6 |   a(a,b,c);
      |   ^
main.c:2:5: note: declared here
    2 | int a,b,c;
      |     ^
main.c:9:3: error: called object 'b' is not a function or function pointer
    9 |   b(a,b,c);
      |   ^
main.c:2:7: note: declared here
    2 | int a,b,c;
      |       ^
main.c:11:3: error: called object 'c' is not a function or function pointer
   11 |   c(a,b,c);
      |   ^
main.c:2:9: note: declared here
    2 | int a,b,c;
      |         ^
main.c: At top level:
main.c:13:1: error: expected identifier or '(' before 'return'
   13 | return 0;
      | ^~~~~~
main.c:14:1: error: expected identifier or '(' before '}' token
   14 | }
      | ^
main.c:16:13: error: unknown type name 'b'
   16 | int a(int a,b,c){
      |             ^
main.c:16:15: error: unknown type name 'c'
   16 | int a(int a,b,c){
      |               ^
main.c:27:13: error: unknown type name 'b'
   27 | int b(int a,b,c){
      |             ^
main.c:27:15: error: unknown type name 'c'
   27 | int b(int a,b,c){
      |               ^
main.c:38:13: error: unknown type name 'b'
   38 | int c(int a,b,c){
      |             ^
main.c:38:15: error: unknown type name 'c'
   38 | int c(int a,b,c){
      |               ^
Language: C

int main(void){
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
if(a<b||a<c)
 {
  a(a,b,c);
 }else if(b<c)
 {
  b(a,b,c);
 }else
 {
  c(a,b,c);
 }
return 0;
}

int a(int a,b,c){
if(b<c)
 {
  printf("%d %d %d\n",a,b,c);
 }else
 {
  printf("%d %d %d\n",a,c,b);
 }
return 0;
}

int b(int a,b,c){
if(a<c)
 {
  printf("%d %d %d\n",b,a,c);
 }else
 {
  printf("%d %d %d\n",b,c,a);
 }
return 0;
}

int c(int a,b,c){
if(a<b)
 {
  printf("%d %d %d\n",c,a,b);
 }else
 {
  printf("%d %d %d\n",c,b,a);
 }
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 | scanf("%d %d %d",&a,&b,&c);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:3:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 | scanf("%d %d %d",&a,&b,&c);
      | ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:3: error: called object 'a' is not a function or function pointer
    6 |   a(a,b,c);
      |   ^
main.c:2:5: note: declared here
    2 | int a,b,c;
      |     ^
main.c:9:3: error: called object 'b' is not a function or function pointer
    9 |   b(a,b,c);
      |   ^
main.c:2:7: note: declared here
    2 | int a,b,c;
      |       ^
main.c:12:3: error: called object 'c' is not a function or function pointer
   12 |   c(a,b,c);
      |   ^
main.c:2:9: note: declared here
    2 | int a,b,c;
      |         ^
main.c: At top level:
main.c:17:13: error: unknown type name 'b'
   17 | int a(int a,b,c){
      |             ^
main.c:17:15: error: unknown type name 'c'
   17 | int a(int a,b,c){
      |               ^
main.c:28:13: error: unknown type name 'b'
   28 | int b(int a,b,c){
      |             ^
main.c:28:15: error: unknown type name 'c'
   28 | int b(int a,b,c){
      |               ^
main.c:39:13: error: unknown type name 'b'
   39 | int c(int a,b,c){
      |             ^
main.c:39:15: error: unknown type name 'c'
   39 | int c(int a,b,c){
      |               ^
Language: C

int main(void){
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
if(a<b&&a<c)
 {
  a(a,b,c);
 }else if(b<c)
 {
  b(a,b,c);
 }else
 {
  c(a,b,c);
 }
return 0;
}

int a(int a,b,c){
if(b<c)
 {
  printf("%d %d %d\n",a,b,c);
 }else
 {
  printf("%d %d %d\n",a,c,b);
 }
return 0;
}

int b(int a,b,c){
if(a<c)
 {
  printf("%d %d %d\n",b,a,c);
 }else
 {
  printf("%d %d %d\n",b,c,a);
 }
return 0;
}

int c(int a,b,c){
if(a<b)
 {
  printf("%d %d %d\n",c,a,b);
 }else
 {
  printf("%d %d %d\n",c,b,a);
 }
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 | scanf("%d %d %d",&a,&b,&c);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:3:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 | scanf("%d %d %d",&a,&b,&c);
      | ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:3: error: called object 'a' is not a function or function pointer
    6 |   a(a,b,c);
      |   ^
main.c:2:5: note: declared here
    2 | int a,b,c;
      |     ^
main.c:9:3: error: called object 'b' is not a function or function pointer
    9 |   b(a,b,c);
      |   ^
main.c:2:7: note: declared here
    2 | int a,b,c;
      |       ^
main.c:12:3: error: called object 'c' is not a function or function pointer
   12 |   c(a,b,c);
      |   ^
main.c:2:9: note: declared here
    2 | int a,b,c;
      |         ^
main.c: At top level:
main.c:17:13: error: unknown type name 'b'
   17 | int a(int a,b,c){
      |             ^
main.c:17:15: error: unknown type name 'c'
   17 | int a(int a,b,c){
      |               ^
main.c:28:13: error: unknown type name 'b'
   28 | int b(int a,b,c){
      |             ^
main.c:28:15: error: unknown type name 'c'
   28 | int b(int a,b,c){
      |               ^
main.c:39:13: error: unknown type name 'b'
   39 | int c(int a,b,c){
      |             ^
main.c:39:15: error: unknown type name 'c'
   39 | int c(int a,b,c){
      |               ^
Language: C

#include <math.h>

int main(void){
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
if(a<b&&a<c)
 {
  a(a,b,c);
 }else if(b<c)
 {
  b(a,b,c);
 }else
 {
  c(a,b,c);
 }
return 0;
}

int a(int a,b,c){
if(b<c)
 {
  printf("%d %d %d\n",a,b,c);
 }else
 {
  printf("%d %d %d\n",a,c,b);
 }
return 0;
}

int b(int a,b,c){
if(a<c)
 {
  printf("%d %d %d\n",b,a,c);
 }else
 {
  printf("%d %d %d\n",b,c,a);
 }
return 0;
}

int c(int a,b,c){
if(a<b)
 {
  printf("%d %d %d\n",c,a,b);
 }else
 {
  printf("%d %d %d\n",c,b,a);
 }
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    5 | scanf("%d %d %d",&a,&b,&c);
      | ^~~~~
main.c:2:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    1 | #include <math.h>
  +++ |+#include <stdio.h>
    2 | 
main.c:5:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    5 | scanf("%d %d %d",&a,&b,&c);
      | ^~~~~
main.c:5:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:8:3: error: called object 'a' is not a function or function pointer
    8 |   a(a,b,c);
      |   ^
main.c:4:5: note: declared here
    4 | int a,b,c;
      |     ^
main.c:11:3: error: called object 'b' is not a function or function pointer
   11 |   b(a,b,c);
      |   ^
main.c:4:7: note: declared here
    4 | int a,b,c;
      |       ^
main.c:14:3: error: called object 'c' is not a function or function pointer
   14 |   c(a,b,c);
      |   ^
main.c:4:9: note: declared here
    4 | int a,b,c;
      |         ^
main.c: At top level:
main.c:19:13: error: unknown type name 'b'
   19 | int a(int a,b,c){
      |             ^
main.c:19:15: error: unknown type name 'c'
   19 | int a(int a,b,c){
      |               ^
main.c:30:13: error: unknown type name 'b'
   30 | int b(int a,b,c){
      |             ^
main.c:30:15: error: unknown type name 'c'
   30 | int b(int a,b,c){
      |               ^
main.c:41:13: error: unknown type name 'b'
   41 | int c(int a,b,c){
      |             ^
main.c:41:15: error: unknown type name 'c'
   41 | int c(int a,b,c){
      |               ^
Language: C

include<stdio.h>

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

while(a>=b || b>=c){
 if(a>b){
 k=a;
 a=b;
 b=k;
 }
 if(b>c){
 k=b;
 b=c;
 c=k;
 }
}

printf("%d %d %d",a,b,c);
return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

include<stdio.h>

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

while(a>=b || b>=c){
 if(a>b){
 k=a;
 a=b;
 b=k;
 }
 if(b>c){
 k=b;
 b=c;
 c=k;
 }
}

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

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

/*ITP1_2_C.c*/
int main(void){
   int a,b,c;
   scanf("%d %d %d",&a,&b,&c);
   if(a<=b && b<=c){
      printf("%d %d %d\n",a,b,c);
      return 0;
   }
   if(a<=c && c<=b){
      printf("%d %d %d\n",a,c,b);
      return 0;
   }
   if(b<=a && a<=c){
      printf("%d %d %d\n",b,a,c);
      return 0;
   }
   if(b<=c && c<=a){
      printf("%d %d %d\n",b,c,a);
      return 0;
   }
   if(c=a && a=b){
      printf("%d %d %d\n",c,a,b);
      return 0;
   }
   if(c<=b && b<=a){
      printf("%d %d %d\n",c,b,a);
      return 0;
   }
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:4: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |    scanf("%d %d %d",&a,&b,&c);
      |    ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | /*ITP1_2_C.c*/
main.c:4:4: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |    scanf("%d %d %d",&a,&b,&c);
      |    ^~~~~
main.c:4:4: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:7: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    6 |       printf("%d %d %d\n",a,b,c);
      |       ^~~~~~
main.c:6:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:6:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:10:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   10 |       printf("%d %d %d\n",a,c,b);
      |       ^~~~~~
main.c:10:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   14 |       printf("%d %d %d\n",b,a,c);
      |       ^~~~~~
main.c:14:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:18:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   18 |       printf("%d %d %d\n",b,c,a);
      |       ^~~~~~
main.c:18:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:21:15: error: lvalue required as left operand of assignment
   21 |    if(c=a && a=b){
      |               ^
main.c:22:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   22 |       printf("%d %d %d\n",c,a,b);
      |       ^~~~~~
main.c:22:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:26:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   26 |       printf("%d %d %d\n",c,b,a);
      |       ^~~~~~
main.c:26:7: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

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



Compiler output:
main.c: In function 'main':
main.c:14:16: error: expected ';' before 'a'
   14 |       a[x]=a[j]
      |                ^
      |                ;
   15 |       a[j]=min;
      |       ~
Language: C

#include <bits/stdc++.h>
using namespace std;
int arr[5];
int main()
{
	ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
	int a ,b,c;
	for (int i = 0 ; i < 3;i++) cin >> arr[i];
	sort(arr,arr+3);
	for (int i =0 ; i< 3 ;i++)
        cout << arr[i] << " ";
	cout << endl;
    return 0;
}



Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

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



Compiler output:
main.c: In function 'main':
main.c:9:12: warning: missing terminating " character
    9 |     printf("%d %d %d\",a,b,c);
      |            ^
main.c:9:12: error: missing terminating " character
    9 |     printf("%d %d %d\",a,b,c);
      |            ^~~~~~~~~~~~~~~~~~~
main.c:10:4: error: expected expression before '}' token
   10 |    }
      |    ^
main.c:9:12: error: expected ';' before '}' token
    9 |     printf("%d %d %d\",a,b,c);
      |            ^
      |            ;
   10 |    }
      |    ~
Language: C

#include <stdio.h>

int main(void)
{
	int a ,b ,c ,X ,Y ,Z ,P;
	scanf("%d%d%d" ,&a ,&b ,&c);
	if(a >= b);
	else {
	X = a;
	a = b;
	b = X;}
	if(b >= c);
	else {
		Y = b;
		b = c;
		c = Y;}
		if(a >= c);
		else {
			Z = a;
			a = c;
			c = Z;}
			if(a >= b);
			else {
				P = a;
				a = b;
				b = P;}
			printf("%d %d %d\n" ,a ,b ,c\n);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:27:53: error: stray '\' in program
   27 |                         printf("%d %d %d\n" ,a ,b ,c\n);
      |                                                     ^
main.c:27:53: error: expected ')' before 'n'
   27 |                         printf("%d %d %d\n" ,a ,b ,c\n);
      |                               ~                     ^~
      |                                                     )
Language: C

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

void Sort(int a, int b, int c) 
{
	int output1 = num1;
	int output2 = num2;
	int output3 = num3;

	cin >> num1, num2, num3;
	cout << output1 << " " << output2 << " " << output3 << endl;

	if (a>b) 
	{
		int tmp = a;
		a = b;
		b = tmp;
	}
	if (a>c) 
	{
		int tmp = a;
		a = c;
		c = tmp;
	}
	if (b>c) 
	{
		int tmp = b;
		b = c;
		c = tmp;
	}
	
	return 0;
}


Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include <iostream>

void sortOrders(int &a, int &b, int &c){
    if(a>b){
        int tmp = a;
        a = b;
        b = tmp;
    }
    if(a>c){
        int tmp = a;
        a=c;
        c = tmp;
    }
    if(b>c){
        int tmp = b;
        b=c;
        c=tmp;
    }
    return;
}

int main(){
    
    int n1;
    int n2;
    int n3;
    std::cin >> n1 >> n2 >> n3;

    int o1 = n1;
    int o2 = n2;
    int o3 = n3;

    sortOrders(o1,o2,o3);

    std::cout << n1 << " " << n2 << " " << n3 << " "
         << " in sorted order: ";
    std::cout << o1 << " " << o2 << " " << o3 << std::endl;

    return 0;
}


Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>

int main(){

   int a,b,c,;

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

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

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


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


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

return 0;
}




Compiler output:
main.c: In function 'main':
main.c:5:14: error: expected identifier or '(' before ';' token
    5 |    int a,b,c,;
      |              ^
Language: C

#include<stdio.h>

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

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

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


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


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

return 0;
}
   




Compiler output:
main.c: In function 'main':
main.c:4:2: error: expected expression before '%' token
    4 |  %d",&a,&b,&c);
      |  ^
main.c:4:4: warning: missing terminating " character
    4 |  %d",&a,&b,&c);
      |    ^
main.c:4:4: error: missing terminating " character
    4 |  %d",&a,&b,&c);
      |    ^~~~~~~~~~~~
Language: C

// HW.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream>
using namespace std;

int a, b, c;

int readABC()
{
 	cin >> a >> b >> c;
	if (a < 1 || a >10000)
	{
		return 1;
	}
	if (b < 1 || b >10000)
	{
		return 1;
	}
	if (c < 1 || c >10000)
	{
		return 1;
	}
	return 0;
}

int main()
{
	int keepRead = 1;

	while (keepRead  == 1)
	{
		cout << "Please input three integers between 1 and 10000\n";
		keepRead = readABC();
		if (keepRead == 1)
		{
			cout <<  a << " " << b << " " << c << " Are Invalid Numbers. " <<"\n";
		}
	}

	int small, med, large;
	if (a < b && a < c)
	{
		small = a;
		if (b < c)
		{
			med = b;
			large = c;
		}
		else
		{
			med = c;
			large = b;
		}
	}
	if (b < a && b < c)
	{
		small = b;
		if (a < c)
		{
			med = a;
			large = c;
		}
		else
		{
			med = c;
			large = a;
		}
	}
	if (c < b && c < a)
	{
		small = c;
		if (b < a)
		{
			med = b;
			large = a;
		}
		else
		{
			med = a;
			large = b;
		}
	}
	cout << small << " " << med << " " << large;

	cout << "\n" << "finished\n";
	cin >> a;
    return 0;
}




Compiler output:
main.c:4:10: fatal error: stdafx.h: No such file or directory
    4 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
using namespace std;


int a, b, c;

int readABC()
{
	cin >> a >> b >> c;
	if (a < 1 || a >10000)
	{
		return 1;
	}
	if (b < 1 || b >10000)
	{
		return 1;
	}
	if (c < 1 || c >10000)
	{
		return 1;
	}
	return 0;
}

int main()
{
	int keepRead = 1;

	while (keepRead == 1)
	{
		cout << "Please input three integers between 1 and 10000\n";
		keepRead = readABC();
		if (keepRead == 1)
		{
			cout << a << " " << b << " " << c << " Are Invalid Numbers. " << "\n";
		}
	}

	int small, med, large;
	if (a < b && a < c)
	{
		small = a;
		if (b < c)
		{
			med = b;
			large = c;
		}
		else
		{
			med = c;
			large = b;
		}
	}
	if (b < a && b < c)
	{
		small = b;
		if (a < c)
		{
			med = a;
			large = c;
		}
		else
		{
			med = c;
			large = a;
		}
	}
	if (c < b && c < a)
	{
		small = c;
		if (b < a)
		{
			med = b;
			large = a;
		}
		else
		{
			med = a;
			large = b;
		}
	}
	cout << small << " " << med << " " << large;

	cout << "\n" << "finished\n";
	cin >> a;
	return 0;
}




Compiler output:
main.c:2:10: fatal error: iostream: No such file or directory
    2 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>

int main(void)
{
int a, b, c;
	scanf("%d", &a);
	scanf("%d", &b);
	scanf("%d", &c);
	printf("%d %d %d\n", a, b, c);

	if(n1 > n2) {
		int tmp = n1;
		n1 = n2;
		n2 = tmp;
	}
	if(n1 > n3){
		int tmp = n1;
		n1 = n3;
		n3 = tmp;
	}
	if(n2 > n3){
		int tmp = n2;
		n2 = n3;
		n3 = tmp;
	}
	printf("%d %d %d\n", a, b, c);

	return (0);
}



Compiler output:
main.c: In function 'main':
main.c:11:12: error: 'n1' undeclared (first use in this function)
   11 |         if(n1 > n2) {
      |            ^~
main.c:11:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:17: error: 'n2' undeclared (first use in this function)
   11 |         if(n1 > n2) {
      |                 ^~
main.c:16:17: error: 'n3' undeclared (first use in this function)
   16 |         if(n1 > n3){
      |                 ^~
Language: C

#include<stdio.h>

int main(void)
{
    int a,b,c,d;
    int i,j;
    scanf("%d %d %d",&a,&b,&c);
    if(a>b)
    {     
        d = a;
        b = a;
        a = d;
    }else if(b>c){
        d = b;
        c = b;
        b = d;
    }
}
    printf("%d %d %d\n",&a,&b,&c);
    return 0;
}        


Compiler output:
main.c:19:12: error: expected declaration specifiers or '...' before string constant
   19 |     printf("%d %d %d\n",&a,&b,&c);
      |            ^~~~~~~~~~~~
main.c:19:25: error: expected declaration specifiers or '...' before '&' token
   19 |     printf("%d %d %d\n",&a,&b,&c);
      |                         ^
main.c:19:28: error: expected declaration specifiers or '...' before '&' token
   19 |     printf("%d %d %d\n",&a,&b,&c);
      |                            ^
main.c:19:31: error: expected declaration specifiers or '...' before '&' token
   19 |     printf("%d %d %d\n",&a,&b,&c);
      |                               ^
main.c:20:5: error: expected identifier or '(' before 'return'
   20 |     return 0;
      |     ^~~~~~
main.c:21:1: error: expected identifier or '(' before '}' token
   21 | }
      | ^
Language: C

#include<stdio.h>

int main(void)
{
    int a,b,c,d;
    int i,j;
    scanf("%d %d %d",&a,&b,&c);
    if(a>b)
    {     
        d = a;
        b = a;
        a = d;
    }else if(b>c){
        d = b;
        c = b;
        b = d;
    }
}
    printf("%d %d %d\n",a,b,c);
    return 0;
}        


Compiler output:
main.c:19:12: error: expected declaration specifiers or '...' before string constant
   19 |     printf("%d %d %d\n",a,b,c);
      |            ^~~~~~~~~~~~
main.c:19:25: error: unknown type name 'a'
   19 |     printf("%d %d %d\n",a,b,c);
      |                         ^
main.c:19:27: error: unknown type name 'b'
   19 |     printf("%d %d %d\n",a,b,c);
      |                           ^
main.c:19:29: error: unknown type name 'c'
   19 |     printf("%d %d %d\n",a,b,c);
      |                             ^
main.c:20:5: error: expected identifier or '(' before 'return'
   20 |     return 0;
      |     ^~~~~~
main.c:21:1: error: expected identifier or '(' before '}' token
   21 | }
      | ^
Language: C

#include<stdio.h>
int main(){
int array[100],n,c,d,swap;
printf("Enter number of elements\n");
scanf("%d",&n);
printf("Enter %d integers\n",n);
for (c=0; c<n; c++)
scanf("%d", &array[c]);
for(c=0; c<(n-1);c++)
{
for (d=0; d<n-c-1;d++);
{
 if (array [d]>array[d+1]
 {
 swap=array[d];
 array=array[d+1];
 array[d+1]=swap;
  }
 }
}
printf("sorted list in ascending order\n");
for (c=0; c<n; c++)
printf("%d\n", array[c]);
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:13:26: error: expected ')' before '{' token
   13 |  if (array [d]>array[d+1]
      |     ~                    ^
      |                          )
   14 |  {
      |  ~                        
main.c:19:2: error: expected expression before '}' token
   19 |  }
      |  ^
Language: C

#include<stdio.h>
void selectionsort(int a[],int size);
main()
{
int i,j,size;
printf("Enter number of elements\n");
scanf("%d",&size);
int a[size];
printf("Enter numbers\n");
for(i=0;i<size;i++)
{
 scanf("%d",&a[i]);

}
selectionsort(a,size);
printf("Ascending order of given numbers is\n");
for(i=0;i<size;i++)
{
 printf("%d\n",a[i]);

}

}
void selectionsort(int a[],int size)
{
 int temp,i,j,pointer;
 for(i=0;i<size-1;i++) 
{
 pointer=i;
 for(j=i+1;j<size;j++) 
{
 if(a[pointer]>a[j])//For descending-->
 change >
 to <
 
{
 pointer=j;
 
}
 if(pointer!=i) 
{
 temp=a[pointer];
 a[pointer]=a[i];
 a[i]=temp;
 
}
 
}
 
}

}


Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main()
      | ^~~~
main.c: In function 'selectionsort':
main.c:33:2: error: 'change' undeclared (first use in this function)
   33 |  change >
      |  ^~~~~~
main.c:33:2: note: each undeclared identifier is reported only once for each function it appears in
main.c:34:2: error: 'to' undeclared (first use in this function)
   34 |  to <
      |  ^~
main.c:36:1: error: expected expression before '{' token
   36 | {
      | ^
Language: C

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

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    6 |         scanf_s("%d", &a);
      |         ^~~~~~~
      |         scanf
Language: C

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

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

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

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

	 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:28:24: error: lvalue required as left operand of assignment
   28 |         if (a = b && b = c) {
      |                        ^
Language: C

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

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

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

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

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

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

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



Compiler output:
main.c: In function 'main':
main.c:28:24: error: lvalue required as left operand of assignment
   28 |         if (a = b && b = c) {
      |                        ^
main.c:51:24: error: lvalue required as left operand of assignment
   51 |         if (a = b && b = c) {
      |                        ^
Language: C

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

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

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

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

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

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

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

	 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:28:24: error: lvalue required as left operand of assignment
   28 |         if (a = b && b = c) {
      |                        ^
main.c:51:24: error: lvalue required as left operand of assignment
   51 |         if (a = b && b = c) {
      |                        ^
Language: C

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


    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:16:10: error: expected ';' before ':' token
   16 |     d = b:
      |          ^
      |          ;
Language: C

#include "stdio.h"

int main()
{
	int input = 0;
	int a[3] = 0;
	int buff = 0;

	int i = 0;
	for(i = 0; i < 3; i++)
	{
		scanf("%d", &input);
		if(input < 1 || input > 10001)
		{
			return 0;
		}
		else
		{
			a[i] = input;
		}
	}

	while(a[0] > a[1] || a[1] > a[2])
{
	if(a[0] > a[1])
	{
		buff = a[1];
		a[1] = a[0];
		a[0] = buff;
	}
	if(a[0] > a[2])
	{
		buff = a[2];
		a[2] = a[0];
		a[0] = buff;
	}
	if(a[1] > a[2])
	{
		buff = a[2];
		a[2] = a[1];
		a[1] = buff;
	}
}

	printf("%d %d %d\n", a[0], a[1],a[2]);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:20: error: invalid initializer
    6 |         int a[3] = 0;
      |                    ^