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

#include <stdio.h>

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

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

Compiler output:
main.c: In function 'main':
main.c:23:1: error: expected declaration or statement at end of input
   23 | }
      | ^
Language: C

#include <stdio.h>
int main(void)
{
   int n1, n2, n3;

   scanf("%d %d %d", %n1, &n2, &n3);

   if (n1 > n2) {
     n1 = n2;
     n2 = n3;
    }
   if (n2 > n3) {
     n2 = n3;
     n3 = n2;
    }
    if (n1 > n2) {
     n1 = n2;
     n2 = n3;
    }

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:22: error: expected expression before '%' token
    6 |    scanf("%d %d %d", %n1, &n2, &n3);
      |                      ^
Language: C

#include <stdio.h>

int main(void)
{
   int n[3], sub;

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

   s = 0;

   if (n[0] > n[1]) {
     s = n[0];
     n[0] = n[1];
     n[1] = s;
    }

   if (n[1] > n[2]) {
     s = n[1];
     n[1] = n[2];
     n[2] = s;
    }

   if (n[0] > n[1]) {
     s = n[0];
     n[0] = n[1];
     n[1] = s;
    }

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

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:4: error: 's' undeclared (first use in this function)
    9 |    s = 0;
      |    ^
main.c:9:4: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<studio.h>

int main() {
  int i, n[3], j, k, temp;

  for (i = 0; i <= 2; i++) {
    scanf("%d", &n[i]);
  }
  
  for (j = 0; j < i - 1; j++) {
    for (k = i - 1; k > j; k--) {
      if (n[k - 1] > n[k]) {
        temp = n[k - 1];
        n[k - 1] = n[k];
        n[k] = temp;
      };
    };
  };

  for (i = 0; i <= 2; i++) {
    printf("%d ", n[i]);
  }
  printf("\n");

  return 0;
}

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

#include<studio.h>
 
int main() {
  int i, n[3], j, k, temp;
 
  for (i = 0; i <= 2; i++) {
    scanf("%d", &n[i]);
  };
   
  for (j = 0; j < i - 1; j++) {
    for (k = i - 1; k > j; k--) {
      if (n[k - 1] > n[k]) {
        temp = n[k - 1];
        n[k - 1] = n[k];
        n[k] = temp;
      };
    };
  };
 
  for (i = 0; i <= 2; i++) {
    printf("%d ", n[i]);
  };
  printf("\n");
 
  return 0;
}

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

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

Compiler output:
main.c: In function 'main':
main.c:20:2: error: expected '}' before 'else'
   20 | }else{
      |  ^~~~
main.c:30:2: error: expected '}' before 'else'
   30 | }else{
      |  ^~~~
main.c:37:1: error: expected declaration or statement at end of input
   37 | }
      | ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:37:1: error: expected declaration or statement at end of input
   37 | }
      | ^
Language: C

#include <stdio.h>

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

int main (int argc, char *argv[]) {
 char buffer[256];
 int numOfInput = 0;
 int input[3]= {0};
  
 fgets(buffer, sizeof(buffer), stdin);
 numOfInput = sscanf(buffer, "%d %d %d", &input[0], &input[1], &input[2]);
  
 if(numOfInput == 3) {
  if(input[0] > input[1]) {
   temp = input[1];
   input[1] = input[0];
   input[0] = temp;
  }
  if(input[1] > input[2]) {
   temp = input[2];
   input[2] = input[1];
   input[1] = temp;
  }
  if(input[2] > input[0]) {
   temp = input[0];
   input[0] = input[2];
   input[2] = temp;
  }
  printf("%d %d %d\n", input[0], input[1], input[2]);
  return (0);
 
} else {
  return (1);
 }
 
}

Compiler output:
main.c: In function 'main':
main.c:19:4: error: 'temp' undeclared (first use in this function)
   19 |    temp = input[1];
      |    ^~~~
main.c:19:4: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main (int argc, char *argv[]) {
 char buffer[256];
 int numOfInput = 0;
 int input[3]= {0};
  
 fgets(buffer, sizeof(buffer), stdin);
 numOfInput = sscanf(buffer, "%d %d %d", &input[0], &input[1], &input[2]);
  
 if(numOfInput == 3) {
  if(input[0] > input[1]) {
   temp = input[1];
   input[1] = input[0];
   input[0] = temp;
  }
  if(input[1] > input[2]) {
   temp = input[2];
   input[2] = input[1];
   input[1] = temp;
  }
  if(input[2] > input[0]) {
   temp = input[0];
   input[0] = input[2];
   input[2] = temp;
  }
  printf("%d %d %d\n", input[0], input[1], input[2]);
  return (0);
 
} else {
  return (1);
 }
 
}

Compiler output:
main.c: In function 'main':
main.c:13:4: error: 'temp' undeclared (first use in this function)
   13 |    temp = input[1];
      |    ^~~~
main.c:13:4: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<algorithm.h>
int main(){
    int a[3];
    int i;
 
    for(i=3;i--;){
        scanf("%d",&a[i]);
    }
	sort(a,a+3);
    printf("%d %d %d\n",a[0],a[1],a[2]);
 
 
}

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

#include<stdio.h>
#include<stdlib.h>
int main(){
    int a[3];
    int i;
 
    for(i=3;i--;){
        scanf("%d",&a[i]);
    }
	q_sort(a,a+3);
    printf("%d %d %d\n",a[0],a[1],a[2]);
 
 
}

Compiler output:
main.c: In function 'main':
main.c:10:9: error: implicit declaration of function 'q_sort'; did you mean 'qsort'? [-Wimplicit-function-declaration]
   10 |         q_sort(a,a+3);
      |         ^~~~~~
      |         qsort
Language: C

#include<stdio.h>
#include<stdlib.h>
int main(){
    int a[3];
    int i;
 
    for(i=3;i--;){
        scanf("%d",&a[i]);
    }
	qsort(a,a+3);
    printf("%d %d %d\n",a[0],a[1],a[2]);
 
 
}

Compiler output:
main.c: In function 'main':
main.c:10:18: error: passing argument 2 of 'qsort' makes integer from pointer without a cast [-Wint-conversion]
   10 |         qsort(a,a+3);
      |                 ~^~
      |                  |
      |                  int *
In file included from main.c:2:
/usr/include/stdlib.h:970:41: note: expected 'size_t' {aka 'long unsigned int'} but argument is of type 'int *'
  970 | extern void qsort (void *__base, size_t __nmemb, size_t __size,
      |                                  ~~~~~~~^~~~~~~
main.c:10:9: error: too few arguments to function 'qsort'
   10 |         qsort(a,a+3);
      |         ^~~~~
/usr/include/stdlib.h:970:13: note: declared here
  970 | extern void qsort (void *__base, size_t __nmemb, size_t __size,
      |             ^~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<algorithm>
using namespace std;
int main(){
    int a[3];
    int i;
 
    for(i=3;i--;){
        scanf("%d",&a[i]);
    }
	sort(a,a+3);
    printf("%d %d %d\n",a[0],a[1],a[2]);
 
 
}

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

#include <stdio.h>

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

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

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

Compiler output:
main.c:26:2: error: stray '#' in program
   26 | }#include <stdio.h>
      |  ^
main.c:26:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   26 | }#include <stdio.h>
      |           ^
main.c:51:2: error: stray '#' in program
   51 | }#include <stdio.h>
      |  ^
main.c:51:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   51 | }#include <stdio.h>
      |           ^
Language: C

#include <iostream>

using namespace std;

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

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 << "\n" ;
}

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

#include <stdio.h>
#include <conio.h>

int main(void)
{
	int x[3];
	int a;
	int i;
	int j;
	int tmp;
	
	for (a = 0; a < 3; a++){
		scanf("%d", &x[a]);
	}
	for (i = 0; i < 3; i++){
		for (j = i + 1; j < 3; j++){
			if (x[i] > x[j]){
				tmp = x[i];
				x[i] = x[j];
				x[j] = tmp;
			}
		}
	}
	for (a = 0; a < 3; a++){
		printf("%d", x[a]);
		if (a == 2){
			continue;
		}
		printf(" ");
	}
	puts("");
	
	return (0);
}

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

#include <stdio.h>
#include <conio.h>

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

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

#include <stdio.h>
#include <stdlib.h>
int a[3];
int b, c, d;
scanf("%d %d %d",&a[0],&a[1],&a[2]);
for(b = 0;b < 2;b++){
for(c = b + 1;c <= 2;c++){
if(a[b] > a[c]){
a[b] = d;
a[b] = a[c];
a[c] = d;
}
}
}
printf("%d %d %d",a[0],a[1],a[2]);

return 0;
}

Compiler output:
main.c:5:7: error: expected declaration specifiers or '...' before string constant
    5 | scanf("%d %d %d",&a[0],&a[1],&a[2]);
      |       ^~~~~~~~~~
main.c:5:18: error: expected declaration specifiers or '...' before '&' token
    5 | scanf("%d %d %d",&a[0],&a[1],&a[2]);
      |                  ^
main.c:5:24: error: expected declaration specifiers or '...' before '&' token
    5 | scanf("%d %d %d",&a[0],&a[1],&a[2]);
      |                        ^
main.c:5:30: error: expected declaration specifiers or '...' before '&' token
    5 | scanf("%d %d %d",&a[0],&a[1],&a[2]);
      |                              ^
main.c:6:1: error: expected identifier or '(' before 'for'
    6 | for(b = 0;b < 2;b++){
      | ^~~
main.c:6:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    6 | for(b = 0;b < 2;b++){
      |             ^
main.c:6:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
    6 | for(b = 0;b < 2;b++){
      |                  ^~
main.c:15:8: error: expected declaration specifiers or '...' before string constant
   15 | printf("%d %d %d",a[0],a[1],a[2]);
      |        ^~~~~~~~~~
main.c:15:19: error: expected declaration specifiers or '...' before 'a'
   15 | printf("%d %d %d",a[0],a[1],a[2]);
      |                   ^
main.c:15:24: error: expected declaration specifiers or '...' before 'a'
   15 | printf("%d %d %d",a[0],a[1],a[2]);
      |                        ^
main.c:15:29: error: expected declaration specifiers or '...' before 'a'
   15 | printf("%d %d %d",a[0],a[1],a[2]);
      |                             ^
main.c:17:1: error: expected identifier or '(' before 'return'
   17 | return 0;
      | ^~~~~~
main.c:18:1: error: expected identifier or '(' before '}' token
   18 | }
      | ^
Language: C

#include<stdio.h>

main(){
 int a[3];

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

 if(a[0]>a[2])
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:9:1: error: expected expression before '}' token
    9 | }
      | ^
Language: C

#include <stdio.h>

int main (void)
{
  int a, b, c, sub;

  scanf("%d %d %d", a, b, c);
  
  while(true)
  {
    if ((a <= b) && (b <= c))
    {
      break;
    }

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

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

    }
  }

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

  return 0;
}

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

#include <stdio.h>

int main (void)
{
  int a, b, c, sub;

  scanf("%d %d %d", &a, &b, &c);
  
  while(true)
  {
    if ((a <= b) && (b <= c))
    {
      break;
    }

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

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

    }
  }

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

  return 0;
}

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

#include<stdio.h>

main(){

  int a[3],t,i,j,min;

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

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

  return 0;
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:18:3: error: implicit declaration of function 'pirntf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   18 |   pirntf("\n");
      |   ^~~~~~
      |   printf
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(b<a&&a<c){
    printf("%d %d %d\n",b,a,c);
       }
    else if(a<c&&c<b){
    printf("%d %d %d\n",a,c,b);
       }
    else if(c<a&&a<b){
    printf("%d %d %d\n",c,a,b);
       }
    else if(b<c&&c<a){
    printf("%d %d %d\n",b,c,a);
       }
    else(c<b&&b<a){
    printf("%d %d %d\n",c,b,a);
       }
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:21:19: error: expected ';' before '{' token
   21 |     else(c<b&&b<a){
      |                   ^
      |                   ;
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:21:21: error: expected ';' before '}' token
   21 |   printf("%d ",a[i])
      |                     ^
      |                     ;
   22 |     }
      |     ~
Language: C

#include<cstdio>
 
void Swap(int *x,int *y)
{
    int work;
    work = *x;
    *x = *y;
    *y = work;
}
 
 
 
int main()
{
    int a,b,c;
    scanf("%d %d %d",&a,&b,&c);
    if(a>b)
      { Swap(&a,&b); }
    else if(b>c)
       { Swap(&b,&c); }
    else if(a>c)   
        { Swap(&a,&c); }
    printf("%d %d %d",a,b,c);    
        
}

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

int abs (int a) 
{
    int b = a;
    b = (b >> (sizeof(int)*CHAR_BIT-1) & 1);
    return 2 * b * (a) + a; 
}
int max (int a, int b) { return (a + b + abs(a - b)) / 2; }
int min (int a, int b) { return (a + b - abs(a - b)) / 2; }


void sort (int & a, int & b, int & c)
{       
   int maxnum = max(max(a,b), c);
   int minnum = min(min(a,b), c);
   int middlenum = a + b + c - maxnum - minnum;
   a = maxnum;
   b = middlenum;
   c = minnum;
}

Compiler output:
main.c: In function 'abs':
main.c:4:28: error: 'CHAR_BIT' undeclared (first use in this function)
    4 |     b = (b >> (sizeof(int)*CHAR_BIT-1) & 1);
      |                            ^~~~~~~~
main.c:1:1: note: 'CHAR_BIT' is defined in header '<limits.h>'; this is probably fixable by adding '#include <limits.h>'
  +++ |+#include <limits.h>
    1 | int abs (int a)
main.c:4:28: note: each undeclared identifier is reported only once for each function it appears in
    4 |     b = (b >> (sizeof(int)*CHAR_BIT-1) & 1);
      |                            ^~~~~~~~
main.c: At top level:
main.c:11:16: error: expected ';', ',' or ')' before '&' token
   11 | void sort (int & a, int & b, int & c)
      |                ^
Language: C

#include<stdio.h>

main(){
 int a,b,c,temp;

 scanf("%d %d %d",a,b,c);
 if(a>b){
  temp = a;
  a = b;
  b = temp
 }
 if(b>c){
  temp = b;
  b = c;
  c = temp
 }

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

 return 0;
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:10:11: error: expected ';' before '}' token
   10 |   b = temp
      |           ^
      |           ;
   11 |  }
      |  ~         
main.c:15:11: error: expected ';' before '}' token
   15 |   c = temp
      |           ^
      |           ;
   16 |  }
      |  ~
Language: C

#include<stdio.h>

int main(){
 int a,b,c,temp;

 scanf("%d %d %d",a,b,c);
 if(a>b){
  temp = a;
  a = b;
  b = temp
 }
 if(b>c){
  temp = b;
  b = c;
  c = temp
 }

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

 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:11: error: expected ';' before '}' token
   10 |   b = temp
      |           ^
      |           ;
   11 |  }
      |  ~         
main.c:15:11: error: expected ';' before '}' token
   15 |   c = temp
      |           ^
      |           ;
   16 |  }
      |  ~
Language: C

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

Compiler output:
main.c:1:1: error: stray '\1' in program
    1 | <U+0001><U+0001><U+0001>#include <stdio.h>
      | ^~~~~~~~
main.c:1:2: error: stray '\1' in program
    1 | <U+0001><U+0001><U+0001>#include <stdio.h>
      |         ^~~~~~~~
main.c:1:3: error: stray '\1' in program
    1 | <U+0001><U+0001><U+0001>#include <stdio.h>
      |                 ^~~~~~~~
main.c:1:4: error: stray '#' in program
    1 | #include <stdio.h>
      |    ^
main.c:1:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | #include <stdio.h>
      |             ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:19:30: error: subscripted value is neither array nor pointer nor vector
   19 |         printf("%d %d %d\n",a[0],a[1],a[2]);
      |                              ^
main.c:19:35: error: subscripted value is neither array nor pointer nor vector
   19 |         printf("%d %d %d\n",a[0],a[1],a[2]);
      |                                   ^
main.c:19:40: error: subscripted value is neither array nor pointer nor vector
   19 |         printf("%d %d %d\n",a[0],a[1],a[2]);
      |                                        ^
Language: C

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


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

Compiler output:
main.c:30:1: error: expected identifier or '(' before '}' token
   30 | }
      | ^
main.c:32:4: error: expected identifier or '(' before '}' token
   32 |    }
      |    ^
main.c:33:9: error: 'b' undeclared here (not in a function)
   33 |       c[b[i]]=a[i];
      |         ^
main.c:33:11: error: 'i' undeclared here (not in a function)
   33 |       c[b[i]]=a[i];
      |           ^
main.c:33:7: warning: data definition has no type or storage class
   33 |       c[b[i]]=a[i];
      |       ^
main.c:33:7: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
main.c:33:15: error: 'a' undeclared here (not in a function)
   33 |       c[b[i]]=a[i];
      |               ^
main.c:34:4: error: expected identifier or '(' before '}' token
   34 |    }
      |    ^
main.c:35:11: error: expected declaration specifiers or '...' before string constant
   35 |    printf("%d %d %d\n",c[2],c[1],c[0]);
      |           ^~~~~~~~~~~~
main.c:35:24: error: expected declaration specifiers or '...' before 'c'
   35 |    printf("%d %d %d\n",c[2],c[1],c[0]);
      |                        ^
main.c:35:29: error: expected declaration specifiers or '...' before 'c'
   35 |    printf("%d %d %d\n",c[2],c[1],c[0]);
      |                             ^
main.c:35:34: error: expected declaration specifiers or '...' before 'c'
   35 |    printf("%d %d %d\n",c[2],c[1],c[0]);
      |                                  ^
main.c:36:3: error: expected identifier or '(' before 'return'
   36 |   return(0);
      |   ^~~~~~
main.c:37:2: error: expected identifier or '(' before '}' token
   37 |  }
      |  ^
Language: C

#include<stdio.h>
#define N 3
main(){

int a[N],i,t;

for(i=0;i<N;i++){
scanf("%d",&a[i]);

}
if(a[0]>a[1]]){
t=a[0];
a[0]=a[1];
a[1]=t;
}
if(a[0]>a[2]){
t=a[0];
a[0]=a[2];
a[2]=t;
}

if(a[1]>a[2]){
t=a[1];
a[1]=a[2];
a[2]=t;
}

for(i=0;i<N;i++){
printf("%d ",a[i]);
}

}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:11:13: error: expected ')' before ']' token
   11 | if(a[0]>a[1]]){
      |   ~         ^
      |             )
main.c:11:13: error: expected statement before ']' token
main.c:11:14: error: expected statement before ')' token
   11 | if(a[0]>a[1]]){
      |              ^
Language: C

#include<stdio.h>
#define N 3
main(){

int a[N],i,t;

for(i=0;i<N;i++){
scanf("%d",&a[i]);
}

if(a[0]>=a[1]]){
t=a[0];
a[0]=a[1];
a[1]=t;
}

if(a[0]>=a[2]){
t=a[0];
a[0]=a[2];
a[2]=t;
}

if(a[1]>=a[2]){
t=a[1];
a[1]=a[2];
a[2]=t;
}

for(i=0;i<N;i++){
printf("%d ",a[i]);
}
return 0;
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:11:14: error: expected ')' before ']' token
   11 | if(a[0]>=a[1]]){
      |   ~          ^
      |              )
main.c:11:14: error: expected statement before ']' token
main.c:11:15: error: expected statement before ')' token
   11 | if(a[0]>=a[1]]){
      |               ^
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(b>=c){
		d=b;
		b=c;
		c=d;
	}
	if(a>=b){
		d=a;
		a=b;
		b=d;
	}
	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

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(b>=c){
		d=b;
		b=c;
		c=d;
	}
	if(a>=b){
		d=a;
		a=b;
		b=d;
	}
	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 i, j, data[ 3 ], tmp;

	scanf( "%d %d %d", data, data + 1, data + 2 );

	for ( i = 1; i < n; i++ ) {
		tmp = data[ i ];

		for ( j = i; j && data[ j - 1 ] < tmp; j-- )
			data[ j ] = data[ j - 1 ];

		data[ j ] = tmp;
	}

	printf( "%d %d %d\n", data[ 0 ], data[ 1 ], data[ 2 ] );

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:26: error: 'n' undeclared (first use in this function)
    8 |         for ( i = 1; i < n; i++ ) {
      |                          ^
main.c:8:26: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

main(){
int a,b,c,t;
scanf(%d%d%d,&a,&b,&c);
if(b>c){
t=b;
b=c;
c=t;
}
if(a>b){
t=a;
a=b;
b=t;
}
return 0;
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:5:7: error: expected expression before '%' token
    5 | scanf(%d%d%d,&a,&b,&c);
      |       ^
Language: C

#include<stdio.h>

main(){
int a,b,c,t;
scanf(%d%d%d,&a,&b,&c);
if(b>c){
t=b;
b=c;
c=t;
}
if(a>b){
t=a;
a=b;
b=t;
}

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

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:5:7: error: expected expression before '%' token
    5 | scanf(%d%d%d,&a,&b,&c);
      |       ^
main.c:17:25: error: expected ';' before 'return'
   17 | printf("%d %d %d",a,b,c)
      |                         ^
      |                         ;
   18 | return 0;
      | ~~~~~~
Language: C

#include <stdio.h>

void swap(int *nx, int*ny)
{
	int	temp = *nx;
	*nx = *ny;
	*ny = temp;
}

void sort2(int *n1, int*n2)
{
	if (*n1 > *n2)
		swap(n1, n2);
	if (*n1 > *n3)
		swap(n1, n3);
	if (*n2 > *n3)
		swap(n2, n3);

}

int main(void)
{
	int na,nb;
	scanf("%d", &na);
	scanf("%d", &nb);
	scanf("%d", &nc);

	sort2(&na, &nb, &nc);

	printf("%d %d %d\n",na,nb,nc);

	return 0;
}

Compiler output:
main.c: In function 'sort2':
main.c:14:20: error: 'n3' undeclared (first use in this function); did you mean 'n2'?
   14 |         if (*n1 > *n3)
      |                    ^~
      |                    n2
main.c:14:20: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'main':
main.c:26:22: error: 'nc' undeclared (first use in this function); did you mean 'nb'?
   26 |         scanf("%d", &nc);
      |                      ^~
      |                      nb
main.c:28:9: error: too many arguments to function 'sort2'
   28 |         sort2(&na, &nb, &nc);
      |         ^~~~~
main.c:10:6: note: declared here
   10 | void sort2(int *n1, int*n2)
      |      ^~~~~
Language: C

#include <stdio.h>

void swop(int* a,int* b,int* c){

int copy;

if(*a>*b){
copy = *a;
*a = *b;
*b = copy;
}
if(*b>*c)
copy = *b;
*b = *c;
*c = copy;
}
if(*a>*b){
copy = *a;
*a = *b;
*b = copy;
}

}

int main(){

int a,b,c;
scanf("%d %d %d",&a,&b,&c);
swop(&a,&b,&c);
printf("%d %d %d",a,b,c);
return 0;
}

Compiler output:
main.c:17:1: error: expected identifier or '(' before 'if'
   17 | if(*a>*b){
      | ^~
main.c:23:1: error: expected identifier or '(' before '}' token
   23 | }
      | ^
Language: C

#include <stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:10:17: error: 't' undeclared (first use in this function)
   10 |                 t = a;
      |                 ^
main.c:10:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(){

int a,b,c,m;

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

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

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

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

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:7:27: error: expected expression before '%' token
    7 | scanf("%d %d %d", &a, &b, %c);
      |                           ^
Language: C

#include<stdio.h>

int main(){

int a,b,c,m;

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

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

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

if(a>c){
m=a;
a=c;
c=m;
}

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

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:7:27: error: expected expression before '%' token
    7 | scanf("%d %d %d", &a, &b, %c);
      |                           ^
Language: C

#include<stdio.h>

int main()
{
  int x[3], i, j, tmp;

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

  for(i = 0; i < 2; i++)
    {
      for(j = i + 1; i < 3; j++)
	{
	  if(x[i] > x[j])
	    {
	      tmp = x[i];
	      x[i] = x[j];
	      x[j] = tmp;
	    } 
	}
    }

  printf("%d %d %d\n", x[0, x[1], x[2]);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:39: error: expected ']' before ')' token
   22 |   printf("%d %d %d\n", x[0, x[1], x[2]);
      |                                       ^
      |                                       ]
Language: C

#include <stdio.h>

int main(void)
{
    int a, b, c, s;
    
    scanf("%d %d %d", &a, &b, &c);
    
    if (a >= b){
        s = a;
        a = b;
        b = s;
    }
    if (b >= c){
        s = b;
        b = c;
        c = s;
    }
    if (a >= c){
        s = a;
        a = c;
        c = t;
    }
    
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:13: error: 't' undeclared (first use in this function)
   22 |         c = t;
      |             ^
main.c:22:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

int main (int argc, const char * argv[]) {
    int a,b;
	int tmp;
	scanf("%d %d %d", &a, &b, &c);
	if (a>b) {
		tmp=a;
		a=b;
		b=tmp;
	}
	if (b>c) {
		tmp=b;
		b=c;
		c=tmp;
	}
	if (a>b) {
		tmp=a;
		a=b;
		b=tmp;
	}
	printf("%d %d %d",a, b, c);
	return 0;
	
}

Compiler output:
main.c: In function 'main':
main.c:4:9: 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 (int argc, const char * argv[]) {
main.c:4:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |         scanf("%d %d %d", &a, &b, &c);
      |         ^~~~~
main.c:4:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:36: error: 'c' undeclared (first use in this function)
    4 |         scanf("%d %d %d", &a, &b, &c);
      |                                    ^
main.c:4:36: note: each undeclared identifier is reported only once for each function it appears in
main.c:20:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   20 |         printf("%d %d %d",a, b, c);
      |         ^~~~~~
main.c:20:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:20:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:20:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <stdio.h>

int main(){
	int num[3], tmp, i, j;
	scanf("%d %d %d", num[0], num[1], num[2]);
	for (i = 0;i < 3;i++){
		min = num[i];
		for (j = i;j < 3;j++)
			if (min > num[j]) min = j;
		if (min != i){
			tmp = num[i];
			num[i] = num[min];
			num[min] = tmp;
		}
	}
	printf("%d %d %d\n", num[0], num[1], num[2]);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:17: error: 'min' undeclared (first use in this function); did you mean 'main'?
    7 |                 min = num[i];
      |                 ^~~
      |                 main
main.c:7:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:16:1: error: expected declaration or statement at end of input
   16 | }
      | ^
Language: C

#include <stdio.h>

int main(){
int a, b, c, temp;
scanf("%d%d%d" ,&a, &b, &c);
if(a > b){
temp = a;
a = b;
b = temp;
}
if(b > c){
temp = b;
b = c;
c = temp;
}
if(a > b){
temp = b;
a = b;
b = temp;
}

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

}
}

Compiler output:
main.c:25:1: error: expected identifier or '(' before '}' token
   25 | }
      | ^
Language: C

#include <stdio.h>

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

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

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

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

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:25:22: error: expected ')' before 'a'
   25 |   printf("%d %d %d\n"a, b, c);
      |         ~            ^
      |                      )
Language: C

#include <stdio.h>

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

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

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

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

Compiler output:
main.c: In function 'main':
main.c:7:26: error: expected ';' before ')' token
    7 |     for(i = 0; i < 2, i++){
      |                          ^
      |                          ;
Language: C

#include <stdio.h>


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

Compiler output:
main.c: In function 'main':
main.c:23:35: error: 'c' undeclared (first use in this function)
   23 |         scanf("%d %d %d",&a ,&b ,&c);
      |                                   ^
main.c:23:35: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:21: error: too few arguments to function 'small'
   24 |         ans = small(small(a,b),c);
      |                     ^~~~~
main.c:4:5: note: declared here
    4 | int small(int a, int b, int c)
      |     ^~~~~
main.c:24:15: error: too few arguments to function 'small'
   24 |         ans = small(small(a,b),c);
      |               ^~~~~
main.c:4:5: note: declared here
    4 | int small(int a, int b, int c)
      |     ^~~~~
Language: C

#include <stdio.h>


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

Compiler output:
main.c: In function 'main':
main.c:24:21: error: too few arguments to function 'small'
   24 |         ans = small(small(a,b),c);
      |                     ^~~~~
main.c:4:5: note: declared here
    4 | int small(int a, int b, int c)
      |     ^~~~~
main.c:24:15: error: too few arguments to function 'small'
   24 |         ans = small(small(a,b),c);
      |               ^~~~~
main.c:4:5: note: declared here
    4 | int small(int a, int b, int c)
      |     ^~~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:17:51: error: 'd' undeclared (first use in this function)
   17 |                         printf("%d %d %d\n",a ,c ,d;);
      |                                                   ^
main.c:17:51: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:52: error: expected ')' before ';' token
   17 |                         printf("%d %d %d\n",a ,c ,d;);
      |                               ~                    ^
      |                                                    )
main.c:39:51: error: expected ';' before '}' token
   39 |                         printf("%d %d %d",c ,b ,c)
      |                                                   ^
      |                                                   ;
   40 |                 }
      |                 ~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:17:51: error: 'd' undeclared (first use in this function)
   17 |                         printf("%d %d %d\n",a ,c ,d);
      |                                                   ^
main.c:17:51: note: each undeclared identifier is reported only once for each function it appears in
main.c:39:51: error: expected ';' before '}' token
   39 |                         printf("%d %d %d",c ,b ,c)
      |                                                   ^
      |                                                   ;
   40 |                 }
      |                 ~
Language: C

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

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

#include <stdio.h>
int main(void)
{
	int a, b, c;
	
	scanf("%d %d %d",&a ,&b ,&c);
	
	if(a > b)
	{
		if(b > c)
		{
			printf("%d %d %d\n",a ,b ,c);
		}
		
		else
		{
			printf("%d %d %d\n",a ,c ,d);
		}
	}
	else if(b > a)
	{
		if(a > b)
		{
			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:17:51: error: 'd' undeclared (first use in this function)
   17 |                         printf("%d %d %d\n",a ,c ,d);
      |                                                   ^
main.c:17:51: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

    for(i=0;i<3;i++){
        printf("%d ",a[i]);
        
    }
    return 0;
}

Compiler output:
main.c:25:5: error: expected identifier or '(' before 'for'
   25 |     for(i=0;i<3;i++){
      |     ^~~
main.c:25:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   25 |     for(i=0;i<3;i++){
      |              ^
main.c:25:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   25 |     for(i=0;i<3;i++){
      |                  ^~
main.c:29:5: error: expected identifier or '(' before 'return'
   29 |     return 0;
      |     ^~~~~~
main.c:30:1: error: expected identifier or '(' before '}' token
   30 | }
      | ^
Language: C


#include<stdio.h>
int main(void){
   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 else(b<=c){
         printf("%d %d %d"a,c,b)
      }
   }
   else if(a<=b){
      if (b>=c){
         printf("%d %d %d"b,a,c)
      }
      if else (b<=c){
         printf("%d %d %d"b,c,a)
      }
   }

   else{
      if (b>=a){
         printf("%d %d %d"c,b,a)
      }
      if else (b<=a){
         printf("%d %d %d"c,a,b)
      }
   }


   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:27: error: expected ')' before 'a'
   10 |          printf("%d %d %d"a,b,c)
      |                ~          ^
      |                           )
main.c:10:33: error: expected ';' before '}' token
   10 |          printf("%d %d %d"a,b,c)
      |                                 ^
      |                                 ;
   11 |       }
      |       ~                          
main.c:12:10: error: expected '(' before 'else'
   12 |       if else(b<=c){
      |          ^~~~
      |          (
main.c:18:27: error: expected ')' before 'b'
   18 |          printf("%d %d %d"b,a,c)
      |                ~          ^
      |                           )
main.c:18:33: error: expected ';' before '}' token
   18 |          printf("%d %d %d"b,a,c)
      |                                 ^
      |                                 ;
   19 |       }
      |       ~                          
main.c:20:10: error: expected '(' before 'else'
   20 |       if else (b<=c){
      |          ^~~~
      |          (
main.c:27:27: error: expected ')' before 'c'
   27 |          printf("%d %d %d"c,b,a)
      |                ~          ^
      |                           )
main.c:27:33: error: expected ';' before '}' token
   27 |          printf("%d %d %d"c,b,a)
      |                                 ^
      |                                 ;
   28 |       }
      |       ~                          
main.c:29:10: error: expected '(' before 'else'
   29 |       if else (b<=a){
      |          ^~~~
      |          (
Language: C


#include<stdio.h>
int main(void){
   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 else(b<=c){
         printf("%d %d %d"a,c,b);
      }
   }
   else if(a<=b){
      if (b>=c){
         printf("%d %d %d"b,a,c);
      }
      if else (b<=c){
         printf("%d %d %d"b,c,a);
      }
   }

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


   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:27: error: expected ')' before 'a'
   10 |          printf("%d %d %d"a,b,c);
      |                ~          ^
      |                           )
main.c:12:10: error: expected '(' before 'else'
   12 |       if else(b<=c){
      |          ^~~~
      |          (
main.c:18:27: error: expected ')' before 'b'
   18 |          printf("%d %d %d"b,a,c);
      |                ~          ^
      |                           )
main.c:20:10: error: expected '(' before 'else'
   20 |       if else (b<=c){
      |          ^~~~
      |          (
main.c:27:27: error: expected ')' before 'c'
   27 |          printf("%d %d %d"c,b,a);
      |                ~          ^
      |                           )
main.c:29:10: error: expected '(' before 'else'
   29 |       if else (b<=a){
      |          ^~~~
      |          (
Language: C

#include<stdio.h>

int main(){

int i,j,work;

int x[3];

scanf(“%d %d %d”,&x[0],&x[1],&x[2]);

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

for(j=i+1;j<3;j++){

if(x[i]>x[j]){ work=x[i]; x[i]=x[j]; x[j]=work; }

}

}

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

printf(“%d “,x[i]);

}

printf(“\n”);

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:9:7: error: stray '\342' in program
    9 | scanf(<U+201C>%d %d %d<U+201D>,&x[0],&x[1],&x[2]);
      |       ^~~~~~~~
main.c:9:8: error: expected expression before '%' token
    9 | scanf(“%d %d %d”,&x[0],&x[1],&x[2]);
      |        ^
main.c:9:16: error: stray '\342' in program
    9 | scanf(<U+201C>%d %d %d<U+201D>,&x[0],&x[1],&x[2]);
      |                       ^~~~~~~~
main.c:23:8: error: stray '\342' in program
   23 | printf(<U+201C>%d <U+201C>,x[i]);
      |        ^~~~~~~~
main.c:23:9: error: expected expression before '%' token
   23 | printf(“%d “,x[i]);
      |         ^
main.c:23:12: error: stray '\342' in program
   23 | printf(<U+201C>%d <U+201C>,x[i]);
      |                   ^~~~~~~~
main.c:27:8: error: stray '\342' in program
   27 | printf(<U+201C>\n<U+201D>);
      |        ^~~~~~~~
main.c:27:9: error: stray '\' in program
   27 | printf(“\n”);
      |         ^
main.c:27:11: error: stray '\342' in program
   27 | printf(<U+201C>\n<U+201D>);
      |                  ^~~~~~~~
main.c:27:10: error: 'n' undeclared (first use in this function)
   27 | printf(“\n”);
      |          ^
main.c:27:10: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:10:19: error: 'NUMBER' undeclared (first use in this function)
   10 |         for(j=0;j<NUMBER;j++){
      |                   ^~~~~~
main.c:10:19: note: each undeclared identifier is reported only once for each function it appears in