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


#include<stdio.h>

int main() {

	int i = 0, x[3000], y[3000], x1, y1;

	do {
		scanf("%d %d", &x[i], &y[i]);

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

		i++;
	} while (1);

	i = 0;

	do {
		if (x[i] == 0 && y[i] == 0)
			break;
		if (x[i] < y[i]) {
			x1 = x[i];
			y1 = y[i];
		}
		else {
			x1 = y[i];
			y1 = x[i];
		}
		printf("%d %d\n", x1, y1);

		i++;
	} while (1);

	return 0;
}}

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

#include<stdio.h>
int main()
{
	int n, i, j;
	long long max = 0, min = 9999999999999999, sum = 0;

	scanf("%d", &n);
	for (i = 0; i < j; i++)
	{
		scanf("%d", &j);
		sum += j;
		if (j > max)
			max = j;
		else if (j < min)
			min = j;
	}
	print("%d %d %d\n", min, max, sum);

	return(0);
}

Compiler output:
main.c: In function 'main':
main.c:17:9: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   17 |         print("%d %d %d\n", min, max, sum);
      |         ^~~~~
      |         printf
Language: C

#include <stdio.h>

int main(void)
{
	long n,min,max,sum = 0;
	int i,n,A[10000] = 0;

	scanf("%d",&n);

	for(i = 0;i = n; i ++)
	{
		scanf("%d",&A[i]);
		if(i == 0)
		{
			min,max = A[i];
		}else{
			if(min > A[i])
			{
				min = A[i];
			}
			if(max < A[i]){
				max = A[i];
			}
		}

		sum = sum + A[i];
	}
	printf("%d %d %d\n",min,max,sum);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:15: error: conflicting types for 'n'; have 'int'
    6 |         int i,n,A[10000] = 0;
      |               ^
main.c:5:14: note: previous declaration of 'n' with type 'long int'
    5 |         long n,min,max,sum = 0;
      |              ^
main.c:6:28: error: invalid initializer
    6 |         int i,n,A[10000] = 0;
      |                            ^
Language: C

#include <stdio.h>

int main(void)
{
	long min,max,sum = 0;
	int i,n,A[10000] = 0;

	scanf("%d",&n);

	for(i = 0;i = n; i ++)
	{
		scanf("%d",&A[i]);
		if(i == 0)
		{
			min,max = A[i];
		}else{
			if(min > A[i])
			{
				min = A[i];
			}
			if(max < A[i]){
				max = A[i];
			}
		}

		sum = sum + A[i];
	}
	printf("%d %d %d\n",min,max,sum);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:28: error: invalid initializer
    6 |         int i,n,A[10000] = 0;
      |                            ^
Language: C

#include <stdio.h>

int main(void)
{
	long min,max,sum = 0L;
	int i,n,A[10000] = 0;

	scanf("%d",&n);

	for(i = 0;i = n; i ++)
	{
		scanf("%d",&A[i]);
		if(i == 0)
		{
			min,max = A[i];
		}else{
			if(min > A[i])
			{
				min = A[i];
			}
			if(max < A[i]){
				max = A[i];
			}
		}

		sum = sum + A[i];
	}
	printf("%d %d %d\n",min,max,sum);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:28: error: invalid initializer
    6 |         int i,n,A[10000] = 0;
      |                            ^
Language: C

#include <stdio.h>

int main(void){
    int n, m;
    int i;
    int max = 0;
    int min = INT_MAX;
    long int sum = 0;

    scanf("%d", &n);
 
    for(i = 0; i < n; i++){
        scanf("%d ", &m);
        sum += m;
        if(max < m) max = m;
        if(min > m) min = m;
    }
    printf("%d %d %ld", min, max, sum);
    return 0;
}

    

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

include <stdio.h>

int main(void){
    int n,i,num,min,max,sum;
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%d",&num);
        sum+=num;
        if(i==0){
            min=num;
            max=num;
            continue;
        }
        if(num<min)
            min=num;
        else if(num>max)
            max=num;
    }
    printf("%d %d %d\n",min,max,sum);
    return 0;
}

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

#include<stdio.h>
int main(){
    int i,n,a[10000],max=a[0],min=a[0];:wq

    long sum=0;
    scanf("%d",&n);
    for(i=0;i<=n-1;i+=1){
        scanf("%d",&a[i]);
        sum=sum+a[i];
        if(min>a[i]){
            min=a[i];
        }
        else if(max<a[i]){
            max=a[i];
        }
    }
    printf("%d\n",a[0]);
    printf("%d %d %ld\n",min,max,sum);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:40: error: expected expression before ':' token
    3 |     int i,n,a[10000],max=a[0],min=a[0];:wq
      |                                        ^
main.c:9:9: error: 'sum' undeclared (first use in this function)
    9 |         sum=sum+a[i];
      |         ^~~
main.c:9:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(){

    int i,n;
    longlong a[100],min,max,sum;
 ???	 
 	  scanf("%d",&n);

 	 for(i=0;i < n;++i){
 	  scanf("%d",&a[i]);
      }
  
      
      min=a[0];
      max=a[0];
      sum=a[0];
      
      for(i=1;i < n;++i){
 	   if(min>a[i]){
		   min=a[i];
	     }else if(max<a[i]){
		   max=a[i];
		 }
	    sum+=a[i];
 	   }  
 	  
 	  printf("%d %d %d\n",min,max,sum);
    
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:5: error: unknown type name 'longlong'
    6 |     longlong a[100],min,max,sum;
      |     ^~~~~~~~
main.c:7:2: error: expected expression before '?' token
    7 |  ???
      |  ^
Language: C

#include <stdio.h>

int main(){

    int i,n;
    long long a[100],min,max,sum;
 ???	 
 	  scanf("%d",&n);

 	 for(i=0;i < n;++i){
 	  scanf("%d",&a[i]);
      }
  
      
      min=a[0];
      max=a[0];
      sum=a[0];
      
      for(i=1;i < n;++i){
 	   if(min>a[i]){
		   min=a[i];
	     }else if(max<a[i]){
		   max=a[i];
		 }
	    sum+=a[i];
 	   }  
 	  
 	  printf("%d %d %d\n",min,max,sum);
    
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:2: error: expected expression before '?' token
    7 |  ???
      |  ^
Language: C

include <stdio.h>
int main(void)


{
	long a, b, i, max, min, sum;
	max = 0,sum = 0;
	scanf("%d", &a);
	for (i = 0;i < a;i++)
	{
		scanf("\n%d", &b);
		if (i == 0)
		{
			min = b;
		}
		if (b < min)
		{
			min = b;
		}
		if (b > max)
		{	
			max = b;
		}
		sum = sum + b;
	}
	printf("%d %d %d\n",min, max, sum);
	return 0;
}

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

int main(void){
 int a = [];
 int n = 0;
 int  


 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:2:10: error: expected expression before '[' token
    2 |  int a = [];
      |          ^
main.c:7:2: error: expected identifier or '(' before 'return'
    7 |  return 0;
      |  ^~~~~~
Language: C

int main(void){
	int n = 0;
	int a = 0;
	long sum = 0;
	int max = 0;
	int min = 1000000;

	scanf("%d", &n);

	for (int i = 0; i < n; i++){
		scanf("%d", &a);
		sum = sum + a;
		if (max<a){
			max = a;
		}
		if (a < min){
			min = a;
		}
	}

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

Compiler output:
main.c: In function 'main':
main.c:8:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    8 |         scanf("%d", &n);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:8:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    8 |         scanf("%d", &n);
      |         ^~~~~
main.c:8:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:21:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   21 |         printf("%d %d %d\n", min,max,sum);
      |         ^~~~~~
main.c:21:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:21:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:21:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>
??
int main(){??
int n,input,max=0,min=0,i;
long sum=0;
scanf("%d",&n);

 for(i=0;i<n;i++){
  scanf("%d",&input);
  if(i==0){
   min = input;
   max = input;
   sum = input;
  }else{
   if(max < input) max=input;
   if(input < min) min=input;
   sum += input;
  }
 }
  printf("%d %d %ld\n",min,max,sum);
return 0;
}

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

#include<stdio.h>
??
int main(){??
int n,input,max=0,min=0,i;
long sum=0;
scanf("%d",&n);
 for(i=0;i<n;i++){
  scanf("%d",&input);
  if(i==0){
   min = input;
   max = input;
   sum = input;
  }else{
   if(max < input) max=input;
   if(input < min) min=input;
   sum += input;
  }
 }
  printf("%d %d %ld\n",min,max,sum);
return 0;
}

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

#include <stdio.h>
??
int main(void) {
int i,n,t,min, max;
long sum;

scanf("%d\n", &n);
for(i=0,sum=0,max=-1000000,min=1000000;i<n;i++) {
scanf("%d", &t);
sum += t;
if(t>max) tmax = t;
if(t<min) tmin = t;
}??
printf("%d %d %ld\n", min, max, sum);
return 0;
}

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

#include <stdio.h>
int main(void)
{
	int n,i,a;

	scanf("%d", &n);

	if ((0 < n) && (n <= 10000))
	{
		for (i = 0;i < n;i++)
		{
			scanf("%d",&a);
		}
}

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

#include<stdio.h>

int main()
{
	int a,j,b,sum,min,max;
	int b[10001];
	max=min;
	sum=min;
	scanf("%d", &a);
	for(j=1;j<a;j++){
		scanf("%d",&b[j]);
		sum += b[j];
		if(max<b[j]){
			max=b[j];
		}
		if(min>b[j]){
			min=b[j];
		}
	}
	printf("%d %d %d\n",min,max,sum);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:13: error: conflicting types for 'b'; have 'int[10001]'
    6 |         int b[10001];
      |             ^
main.c:5:17: note: previous declaration of 'b' with type 'int'
    5 |         int a,j,b,sum,min,max;
      |                 ^
Language: C

#include <stdio.h>
int main()
{
int n,x,m=10000,M=-10000,s;
scanf("%d",n);
for (int i=0;i<n;i++) {
scanf("%d",x);
if (m > x) m = x;
if (M < x) M = x;
s+= x;
}
cout<<m<<" "<<M<<" "<<s<<endl;
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:1: error: 'cout' undeclared (first use in this function)
   12 | cout<<m<<" "<<M<<" "<<s<<endl;
      | ^~~~
main.c:12:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:26: error: 'endl' undeclared (first use in this function)
   12 | cout<<m<<" "<<M<<" "<<s<<endl;
      |                          ^~~~
Language: C

#include<stdio.h>
int main(){
int i, n, a[10000], sum, max, min;
scanf("%d",&n);
for(I=0;i<n;i++){
scanf("%d",&a[i]);
}
sum=0;
max=a[0];
min=a[[0];
for(i=0;i<n;i++){
sum+=a[i];
if(a[i] > max)max=a[i];
if(a[i] < min)min=a[i];
}
printf("%d %d %d\n",min, max, sum);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:5: error: 'I' undeclared (first use in this function)
    5 | for(I=0;i<n;i++){
      |     ^
main.c:5:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:7: error: expected expression before '[' token
   10 | min=a[[0];
      |       ^
main.c:17:10: error: expected ';' before '}' token
   17 | return 0;
      |          ^
      |          ;
   18 | }
      | ~
Language: C

#include<stdio.h>
int main(void){
int min,max,sum,con,i,x;
scanf("%d\n%d",&con,&min);
max=min;
sum=min;
i=1;
while(i == con){
scanf("%d",&x);
if(x<min){
min = x;
}
if(x>max){
max = x;
}
sum = sum + x;
i++;
}
printf("%d %d %d\n",min,max,com);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:29: error: 'com' undeclared (first use in this function); did you mean 'con'?
   19 | printf("%d %d %d\n",min,max,com);
      |                             ^~~
      |                             con
main.c:19:29: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
??
int main(void){
????????long long min,max,sum,con,i,x;
????????scanf("%lld %lld",&con,&min);
????????max=min;
????????sum=min;
????????i=1;
????????while(i < con){
????????????????scanf("%lld",&x);
????????????????if(x<min){
????????????????????????min = x;
????????????????}
????????????????else if(x>max){
????????????????????????max = x;
????????????????}
????????????????sum = sum + x;
????????????????i++;
????????}
????????printf("%lld %lld %lld\n",min,max,sum);
return 0;
}

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

#include <stdio.h>
#define N 10000???

int main()
{
  int n,i,x,sum,min,max;
  int data[N];

  scanf("%d",&n);

  for(i=0;i<n;i++)
  {
    scanf("%d",&x);
    data[i]=x;
  }

  // ????°????????±??????????

  min=data[0];

  for(i=1;i<n;i++)
  {
    if(data[i]<min) min=data[i];
  }

  // max????±??????????

  max=data[0];

  for(i=1;i<n;i++)
  {
    if(data[i]>max) max=data[i];
  }

  // sum????±??????????

  sum=0;

  for(i=0;i<n;i++)
  {
    sum+=data[i];
  }

  printf("%d %d %d\n",min,max,sum);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:2:17: error: expected expression before '?' token
    2 | #define N 10000???
      |                 ^
main.c:7:12: note: in expansion of macro 'N'
    7 |   int data[N];
      |            ^
Language: C

#include <stdio.h>

int main()
{
    int number_of_numbers , Numbers[10000]={},max=0 , min=0 ,Sum_of_numbers = 0, i;

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

    max = Numbers[0];
    min = Numbers[0];

    for(i=0 ; i < number_of_numbers ; i++)
    {
        if(max < Numbers[i]) max = Numbers[i];
        if(min > Numbers[i]) min = Numbers[i];
        Sum_of_numbers += Numbers[i];

    }

    printf("%d %d %d\" ,min,max,Sum_of_numbers);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:12: warning: missing terminating " character
   22 |     printf("%d %d %d\" ,min,max,Sum_of_numbers);
      |            ^
main.c:22:12: error: missing terminating " character
   22 |     printf("%d %d %d\" ,min,max,Sum_of_numbers);
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:24:5: error: expected expression before 'return'
   24 |     return 0;
      |     ^~~~~~
main.c:24:14: error: expected ';' before '}' token
   24 |     return 0;
      |              ^
      |              ;
   25 | }
      | ~
Language: C

#include <stdio.h>

main(){
int a,i,n,max,min,sum;
scanf("%d",&n);
scanf("%d",&a);
max=a;
min=a;
sum=a;
for(i=1,i<n,i++){
   scanf("%d",&a);
   if(a<min) min=a;
   if(max<a) max=a;
   sum=sum+a;
}
printf("%d %d %d",min,max,sum);
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:16: error: expected ';' before ')' token
   10 | for(i=1,i<n,i++){
      |                ^
      |                ;
main.c:10:16: error: expected expression before ')' token
Language: C

nt main(int argc, const char * argv[]) {
#define A_Max 10000
    int a[A_Max], n, i, j, k;
    double sum = 0.0;
    scanf("%d", &n);
    for(i=0; i<n; i++){
        scanf("%d", &a[i]);
        sum=a[i];
    }
    for(i=0; i<n; i++){
        for(j=0; j<n-1; j++){
            if(a[j]>a[j+1]){
                k = a[j];
                a[j] = a[j+1];
                a[j+1] = k;
            }
        }
    }
    
    printf("%d %d %.0f\n", a[0], a[n-1], sum);
    return 0;
}

Compiler output:
main.c:1:1: error: unknown type name 'nt'; did you mean 'int'?
    1 | nt main(int argc, const char * argv[]) {
      | ^~
      | int
main.c: In function 'main':
main.c:5:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    5 |     scanf("%d", &n);
      |     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | nt main(int argc, const char * argv[]) {
main.c:5:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    5 |     scanf("%d", &n);
      |     ^~~~~
main.c:5:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:20:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   20 |     printf("%d %d %.0f\n", a[0], a[n-1], sum);
      |     ^~~~~~
main.c:20:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:20:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:20:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

int main()
#define A_Max 10000
    int a[A_Max], n, i, j, k;
    double sum = 0.0;
    scanf("%d", &n);
    for(i=0; i<n; i++){
        scanf("%d", &a[i]);
        sum=a[i];
    }
    for(i=0; i<n; i++){
        for(j=0; j<n-1; j++){
            if(a[j]>a[j+1]){
                k = a[j];
                a[j] = a[j+1];
                a[j+1] = k;
            }
        }
    }
    
    printf("%d %d %.0f\n", a[0], a[n-1], sum);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:5: error: parameter 'sum' is initialized
    4 |     double sum = 0.0;
      |     ^~~~~~
main.c:5:5: error: expected declaration specifiers before 'scanf'
    5 |     scanf("%d", &n);
      |     ^~~~~
main.c:6:5: error: expected declaration specifiers before 'for'
    6 |     for(i=0; i<n; i++){
      |     ^~~
main.c:6:14: error: expected declaration specifiers before 'i'
    6 |     for(i=0; i<n; i++){
      |              ^
main.c:6:19: error: expected declaration specifiers before 'i'
    6 |     for(i=0; i<n; i++){
      |                   ^
main.c:10:5: error: expected declaration specifiers before 'for'
   10 |     for(i=0; i<n; i++){
      |     ^~~
main.c:10:14: error: expected declaration specifiers before 'i'
   10 |     for(i=0; i<n; i++){
      |              ^
main.c:10:19: error: expected declaration specifiers before 'i'
   10 |     for(i=0; i<n; i++){
      |                   ^
main.c:20:5: error: expected declaration specifiers before 'printf'
   20 |     printf("%d %d %.0f\n", a[0], a[n-1], sum);
      |     ^~~~~~
main.c:21:5: error: expected declaration specifiers before 'return'
   21 |     return 0;
      |     ^~~~~~
main.c:22:1: error: expected declaration specifiers before '}' token
   22 | }
      | ^
main.c:4:12: error: declaration for parameter 'sum' but no such parameter
    4 |     double sum = 0.0;
      |            ^~~
main.c:3:28: error: declaration for parameter 'k' but no such parameter
    3 |     int a[A_Max], n, i, j, k;
      |                            ^
main.c:3:25: error: declaration for parameter 'j' but no such parameter
    3 |     int a[A_Max], n, i, j, k;
      |                         ^
main.c:3:22: error: declaration for parameter 'i' but no such parameter
    3 |     int a[A_Max], n, i, j, k;
      |                      ^
main.c:3:19: error: declaration for parameter 'n' but no such parameter
    3 |     int a[A_Max], n, i, j, k;
      |                   ^
main.c:3:9: error: declaration for parameter 'a' but no such parameter
    3 |     int a[A_Max], n, i, j, k;
      |         ^
main.c:23: error: expected '{' at end of input
Language: C

int main(){
int a[10000],i,n,max,min
double s=0;
scanf("%d",&n);
for(i=1;i<=n;i++){
scanf("%d",&a[i]);
}
max=a[1];
for(i=2;i<=n;i++){
if(a[i]>max){
max=a[i];
}
}
min=a[1];
for(i=2;i<=n;i++){
if(a[i]<min){
min=a[i];
}
}
for(i=1; i<=n; i++){
s += a[i];
}
printf("%d %d %c\n",min,max,s);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'double'
    3 | double s=0;
      | ^~~~~~
main.c:4:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 | scanf("%d",&n);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(){
main.c:4:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 | scanf("%d",&n);
      | ^~~~~
main.c:4:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:14:1: error: 'min' undeclared (first use in this function); did you mean 'main'?
   14 | min=a[1];
      | ^~~
      | main
main.c:14:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:1: error: 's' undeclared (first use in this function)
   21 | s += a[i];
      | ^
main.c:23:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   23 | printf("%d %d %c\n",min,max,s);
      | ^~~~~~
main.c:23:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:23:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:23:1: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

include<stdio.h>

int main(void)
{
	long i, n, max, min, sum, data[10000];
	scanf("%ld",&n);
	for(i=0; i<n; i++) scanf("%ld",&data[i]);
	
	max = min = data[0];
	sum=0;
	for(i=0; i<n; i++){ 
		if(max < data[i]) max = data[i];
		if(min > data[i]) min = data[i];
		sum+=data[i];
	}
	
	printf("%ld %ld %ld\n",min, max, sum);
	return 0;
}

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

int main()
{
int i, a[100000], b, s, j;
double n;
scanf("%d%d", &n, &a[0]);
s=a[0];
b=a[0];
for(i=1; i<n; i++){
    scanf("%d", &a[i]);
    s=s+a[i];
    if(a[i]<a[0]){
        b=a[i];
    }
}
for(j=0; j<n; j++){
    if(a[j]>a[n-1]){
        a[n-1]=a[j];
    }
}
printf("%d %d %d\n", b, a[n-1], s);
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", &n, &a[0]);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main()
main.c:5:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    5 | scanf("%d%d", &n, &a[0]);
      | ^~~~~
main.c:5:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:16:14: error: array subscript is not an integer
   16 |     if(a[j]>a[n-1]){
      |              ^
main.c:17:10: error: array subscript is not an integer
   17 |         a[n-1]=a[j];
      |          ^
main.c:20:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   20 | printf("%d %d %d\n", b, a[n-1], s);
      | ^~~~~~
main.c:20:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:20:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:20:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:20:26: error: array subscript is not an integer
   20 | printf("%d %d %d\n", b, a[n-1], s);
      |                          ^
Language: C

#include<stdio.h>

int main() {
	int n,max,min;
	int a[10001];
	longlong sum = 0;
	int k = 0;
	scanf("%d",&n);
	while (n--) {
		scanf("%d", &a[k]);
		sum = sum + a[k];
		k++;
	}
	if (a[0]>a[1]) {
		max = a[0];
		min = a[1];
	}
	else {
		min = a[0];
		max = a[1];
	}
	for (int i = 2;i < n;i++) {
		if (a[i]>max)
			max = a[i];
		if(a[i]<min)
			min = a[i];
	}
	printf("%d %d %lld\n", min, max, sum);
		
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: unknown type name 'longlong'
    6 |         longlong sum = 0;
      |         ^~~~~~~~
Language: C

#include <stdio.h>
int main(void){
  int n, min, max, sum;
  scanf("%d", &n);
  scanf("%d ", &temp);
  min = temp;
  max = temp;
  sum = temp;
  for (int i = 1; i < n; i++) {
    int temp;
    scanf("%d ", &temp);
    if (temp < min) min = temp;
    if (temp > max) max = temp;
    sum += temp;
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:17: error: 'temp' undeclared (first use in this function)
    5 |   scanf("%d ", &temp);
      |                 ^~~~
main.c:5:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(void){
	int n, con;
	int a[10000];
	long min, max, sum;

	do{
	scanf("%d\n", &n);

	if(n <= 0) break;
	else{
	for(con = 0, sum = 0; con <= n - 1; con++){
		scanf("%d ", &a[con]);

		if(con == 0){
			min = a[con];
			max = a[con];
		}

		if(a[con] < min){
			min = a[con1];
		} else if(a[con] > max){
			max = a[con];
		}

		sum += a[con];
	}
	}

	printf("%d %d %d\n", min, max, sum);
	} while (1);

	return 0;
}

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

#include <stdio.h>

int main(){

int i, n, x, sum;

int max = 0;

int min = a[0];

int sum = 0;

scanf("%d", &n);

int a[n-1];

for(i = 0; i < (n+1); i++){

  scanf("%d", &x);

  a[i] = x; 

  if(a[i] > max){
    max = a[i];
    }

  if(a[i] < min){
    min = a[i];
    } 
  
  sum = a[i] + sum;

}

printf("%d %d %d", min, max, sum);

}

Compiler output:
main.c: In function 'main':
main.c:9:11: error: 'a' undeclared (first use in this function)
    9 | int min = a[0];
      |           ^
main.c:9:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:5: error: redeclaration of 'sum' with no linkage
   11 | int sum = 0;
      |     ^~~
main.c:5:14: note: previous declaration of 'sum' with type 'int'
    5 | int i, n, x, sum;
      |              ^~~
Language: C

#include <stdio.h>

int main(){

int i, n, x;

int max = 0;

int min = a[0];

int sum = 0;

scanf("%d", &n);

int a[n-1];

for(i = 0; i < (n+1); i++){

  scanf("%d", &x);

  a[i] = x; 

  if(a[i] > max){
    max = a[i];
    }

  if(a[i] < min){
    min = a[i];
    } 
  
  sum = a[i] + sum;

}

printf("%d %d %d", min, max, sum);

}

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

#include <stdio.h>

int main(){

int i, n, x;

int max = -1000001, min = 1000001
long sum = 0;

scanf("%d", &n);

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

   scanf("%d", &x);
   if(x > 1000000 || x < -1000000 || n > 10001){break;}
   if(x > max){
   max = x;}
   if(x < min){
   min = x;}
   sum = sum + x;

}

printf("%d %d %d\n", min, max, sum);

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:8:1: error: expected ',' or ';' before 'long'
    8 | long sum = 0;
      | ^~~~
main.c:20:4: error: 'sum' undeclared (first use in this function)
   20 |    sum = sum + x;
      |    ^~~
main.c:20:4: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(){

int i, n, x;

int max = -1000001, min = 1000001
int long sum = 0;

scanf("%d", &n);

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

   scanf("%d", &x);
   if(x > 1000000 || x < -1000000 || n > 10001){break;}
   if(x > max){
   max = x;}
   if(x < min){
   min = x;}
   sum = sum + x;

}

printf("%d %d %d\n", min, max, sum);

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:8:1: error: expected ',' or ';' before 'int'
    8 | int long sum = 0;
      | ^~~
main.c:20:4: error: 'sum' undeclared (first use in this function)
   20 |    sum = sum + x;
      |    ^~~
main.c:20:4: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(){

int i, n, x;

int max = -1000001, min = 1000001
long sum;

scanf("%d", &n);

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

   scanf("%d", &x);
   if(x > 1000000 || x < -1000000 || n > 10001){break;}
   if(x > max){
   max = x;}
   if(x < min){
   min = x;}
   sum += x;

}

printf("%d %d %d\n", min, max, sum);

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:8:1: error: expected ',' or ';' before 'long'
    8 | long sum;
      | ^~~~
main.c:20:4: error: 'sum' undeclared (first use in this function)
   20 |    sum += x;
      |    ^~~
main.c:20:4: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(){

int i, n, x;

int max = -1000001, min = 1000001;

scanf("%d", &n);

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

   scanf("%d", &x);
   long sum;
   if(x > 1000000 || x < -1000000 || n > 10001){break;}
   if(x > max){
   max = x;}
   if(x < min){
   min = x;}
   sum += x;

}

printf("%d %d %d\n", min, max, sum);

return 0;

}

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

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

Compiler output:
main.c: In function 'main':
main.c:13:9: error: implicit declaration of function 'elseif' [-Wimplicit-function-declaration]
   13 |       } elseif(a[i] > max) {
      |         ^~~~~~
main.c:13:27: error: expected ';' before '{' token
   13 |       } elseif(a[i] > max) {
      |                           ^~
      |                           ;
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:13:9: error: implicit declaration of function 'elseif' [-Wimplicit-function-declaration]
   13 |       } elseif(a[i] > max) {
      |         ^~~~~~
main.c:13:27: error: expected ';' before '{' token
   13 |       } elseif(a[i] > max) {
      |                           ^~
      |                           ;
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:10:9: error: expected identifier or '(' before '=' token
   10 |    long = sum;
      |         ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:5:9: error: expected identifier or '(' before '=' token
    5 |    long = sum;
      |         ^
main.c:10:4: error: 'sum' undeclared (first use in this function)
   10 |    sum = a[i];
      |    ^~~
main.c:10:4: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:5:8: error: expected identifier or '(' before '=' token
    5 |    int = sum;
      |        ^
main.c:10:4: error: 'sum' undeclared (first use in this function)
   10 |    sum = a[i];
      |    ^~~
main.c:10:4: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:5:8: error: expected identifier or '(' before '=' token
    5 |    int = sum;
      |        ^
main.c:10:4: error: 'sum' undeclared (first use in this function)
   10 |    sum = a[i];
      |    ^~~
main.c:10:4: note: each undeclared identifier is reported only once for each function it appears in
Language: C

a=1000000,b=-a,t;
main(N){
    long long c=0;
    for(scanf("%d",&N);N--;c+=t){
        scanf("%d",&t);
        if(a>t)a=t;
        if(b<t)b=t;
    }
    printf("%d %d %lld\n",a,b,c);
}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a=1000000,b=-a,t;
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:11: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
    1 | a=1000000,b=-a,t;
      |           ^
main.c:1:13: error: initializer element is not constant
    1 | a=1000000,b=-a,t;
      |             ^
main.c:1:16: error: type defaults to 'int' in declaration of 't' [-Wimplicit-int]
    1 | a=1000000,b=-a,t;
      |                ^
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(N){
      | ^~~~
main.c: In function 'main':
main.c:2:1: error: type of 'N' defaults to 'int' [-Wimplicit-int]
main.c:4:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |     for(scanf("%d",&N);N--;c+=t){
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | a=1000000,b=-a,t;
main.c:4:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |     for(scanf("%d",&N);N--;c+=t){
      |         ^~~~~
main.c:4:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:9:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    9 |     printf("%d %d %lld\n",a,b,c);
      |     ^~~~~~
main.c:9:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:9:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:9:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <stdio.h>

int main(void){
  int n, x, min, max;
  long sum;
  
  scanf("%d", &n);#include <stdio.h>

int main(void){
  int n, x, min, max;
  long sum;
  
  scanf("%d", &n);
  scanf("%d", &x);
  int i;
  min = max = sum = x;
  for(i=1;i<n;i++){
    sum += x;
    if( min > x ){
      min = x;
    }
    else if( max < x){
      max = x;
    }
  }
  printf("%d %d %ld\n", min, max, sum);
  
  return 0;
}

  scanf("%d", &x);
  int i;
  min = max = sum = x;
  for(i=1;i<n;i++){
    sum += x;
    if( min > x ){
      min = x;
    }
    else if( max < x){
      max = x;
    }
  }
  printf("%d %d %ld\n", min, max, sum);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:19: error: stray '#' in program
    7 |   scanf("%d", &n);#include <stdio.h>
      |                   ^
main.c:7:20: error: 'include' undeclared (first use in this function)
    7 |   scanf("%d", &n);#include <stdio.h>
      |                    ^~~~~~~
main.c:7:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:29: error: 'stdio' undeclared (first use in this function); did you mean 'stdin'?
    7 |   scanf("%d", &n);#include <stdio.h>
      |                             ^~~~~
      |                             stdin
main.c:9:1: error: expected expression before 'int'
    9 | int main(void){
      | ^~~
Language: C

include <stdio.h>

int main(void){
  int n, i, x, min, max;
  long sum;
  
  scanf("%d", &n);
  scanf("%d", &x);
 
  min = max = sum = x;
  for(i=1;i<n;i++){
    sum += x;
    if( min > x ){
      min = x;
    }
    else if( max < x){
      max = x;
    }
  }
  printf("%d %d %ld\n", min, max, sum);
  
  return 0;
}

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

#include<stdio.h>
int main() {
	int n,i,data[],min,max,sum = 0;
	scanf("%d",&n);
	if(0 < n && n <= 10000) {
		for(i = 0;i < n;i++) {
			scanf("%d",&data[i])
		}
		min = data[0]; max = data[0];
		for(i = 0;i < n;i++) {
			if(data[i] < min) {
				min = data[i];
			} else if(data[i] > max) {
				max = data[i];
			}
			sum += data[i];
		}
	}
	printf("%d %d %d\n",min,max,sum);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:17: error: array size missing in 'data'
    3 |         int n,i,data[],min,max,sum = 0;
      |                 ^~~~
main.c:7:45: error: expected ';' before '}' token
    7 |                         scanf("%d",&data[i])
      |                                             ^
      |                                             ;
    8 |                 }
      |                 ~
Language: C

#include<stdio.h>
int main() {
	int n,i,data[n],min,max,sum = 0;
	scanf("%d",&n);
	if(0 < n && n <= 10000) {
		for(i = 0;i < n;i++) {
			scanf("%d",&data[i])
		}
		min = data[0]; max = data[0];
		for(i = 0;i < n;i++) {
			if(data[i] < min) {
				min = data[i];
			} else if(data[i] > max) {
				max = data[i];
			}
			sum += data[i];
		}
	}
	printf("%d %d %d\n",min,max,sum);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:45: error: expected ';' before '}' token
    7 |                         scanf("%d",&data[i])
      |                                             ^
      |                                             ;
    8 |                 }
      |                 ~
Language: C

#include<stdio.h>
int main() {
	int n,i,data[10000],min,max,sum = 0;
	scanf("%d",&n);
	if(0 < n && n <= 10000) {
		for(i = 0;i < n;i++) {
			scanf("%d",&data[i]);
		}
		min = data[0]; max = data[0];
		if(???1000000 <= n && n <= 1000000) {
			for(i = 0;i < n;i++) {
				if(data[i] < min) {
					min = data[i];
				} else if(data[i] > max) {
					max = data[i];
				}
				sum += data[i];
			}
		}
	}
	printf("%d %d %d\n",min,max,sum);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:20: error: expected expression before '?' token
   10 |                 if(???1000000 <= n && n <= 1000000) {
      |                    ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:6:18: error: 'a' undeclared (first use in this function)
    6 |     scanf("%d", &a[i]);
      |                  ^
main.c:6:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int main(){
    int i,n, data[10000],min,max;
    long long int sum = 0;
    scanf("%d", &n);
    for (i = 0; i < n; i++)
    {
        scanf("%d", &data[i]);
    }
    min = data[0];
    max = a[0];
    for (i = 0; i < n; i++)
    {
  
        if (min>data[i])
        {
            min = data[i];
        }
        if (max < data[i])
        {
            max = data[i];
        }
  
        sum +=data[i];
  
    }
    printf("%d %d %lld\n", min, max, sum);
    return 0;
}

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

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

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

# include <stdio.h><font></font>
<font></font>
int main () {<font></font>
    int n, i, data[100000];<font></font>
    long int sum=0, min, max;<font></font>
    scanf ("%d", &n);<font></font>
    for (i = 0; i < n; i++) {<font></font>
        scanf ("%d", &data[i]);<font></font>
    }<font></font>
    min = max = data[0];<font></font>
    for (i = 0; i < n; i++) {<font></font>
        if (min > data[i]) {<font></font>
            min = data[i];<font></font>
        }<font></font>
        if (max < data[i]) {<font></font>
            max = data[i];<font></font>
        }<font></font>
        sum = sum + data[i];<font></font>
    }<font></font>
    printf ("%ld %ld %ld\n", min, max, sum);<font></font>
    return 0;<font></font>
}<font></font>
<font></font>
<font></font>

Compiler output:
main.c:1:20: warning: extra tokens at end of #include directive
    1 | # include <stdio.h><font></font>
      |                    ^~~~~~
main.c:2:1: error: expected identifier or '(' before '<' token
    2 | <font></font>
      | ^
main.c:22:2: error: expected identifier or '(' before '<' token
   22 | }<font></font>
      |  ^
Language: C

#include "stdio.h"


int main()
{
    int main() {
        int max, min, i, n, a[10000];
        long sum;

        sum = 0;

        scanf("%d", &n);

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

        max = min = sum = a[0];

        for (i = 1; i<n; i++) {
            if (a[i]>max) { max = a[i]; }
            if (a[i]<min) { min = a[i]; }
            sum += a[i];
        }

        printf("%d %d %ld\n", min, max, sum);
    return 0;
}

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

#include <stdio.h>

int main()
{
    int i, n, a, x min, max, sum;
    
    scanf("%d",&i);

    scanf(" %d",&a);
    min = max = sum = a;
   

    for(i = 1; i < n-1; i++){
    scanf(" %d",&x);
    
    if(x > max){  
    max = x;
    }
    if(x < min){  
    min = x;
    }
    sum = x + sum;
    }
     
    printf("%d %d %d", min, max, sum);

    return 0;
}

    

Compiler output:
main.c: In function 'main':
main.c:5:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'min'
    5 |     int i, n, a, x min, max, sum;
      |                    ^~~
main.c:10:5: error: 'min' undeclared (first use in this function); did you mean 'main'?
   10 |     min = max = sum = a;
      |     ^~~
      |     main
main.c:10:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:11: error: 'max' undeclared (first use in this function)
   10 |     min = max = sum = a;
      |           ^~~
main.c:10:17: error: 'sum' undeclared (first use in this function)
   10 |     min = max = sum = a;
      |                 ^~~
main.c:14:18: error: 'x' undeclared (first use in this function)
   14 |     scanf(" %d",&x);
      |                  ^
Language: C

#include<stdio.h>

int main(){

int n,i,m[100000];
int min,sum,max;
max=0;
min=m[0];
scanf("%d",&n);
for(i=0;i<n;i++){
scasf("%d",&m[i]);

if(m[i]>max)max=m[i];
if(m[i]<=min)min=m[i];
sum=sum+m[i];
}
printf("%d %d %d\n",min,max,sum);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:1: error: implicit declaration of function 'scasf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   11 | scasf("%d",&m[i]);
      | ^~~~~
      | scanf
Language: C


    #include <stdio.h>

int main()
{
    int i, n, a, x, min, max, sum;
    
    scanf("%d",&n);

    scanf(" %d",&a);
    min = max = sum = a;
   

    for(i = 1; i < n; i++){
    scanf(" %d",&x);
    
    if(x => max){  
    max = x;
    }
    if(x <= min){  
    min = x;
    }
    sum = x + sum;
    }
     
    printf("%d %d %d\n", min, max, sum);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:11: error: expected expression before '>' token
   17 |     if(x => max){
      |           ^
Language: C

#include<stdio.h>

int main()
{
   int n, i, max, min, sum=0;
   int m[1000];

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

    min = m[0];
   for (i=0; i<n; i++){
      if (m[i]<min)
         min = m[i];
   }

   max = m[0];
   for (i=0; i<n; i++){
      if (m[i]>max)
         max = m[i];
   }

   for (i=0; i<n; i++)
      sum = sum +m[i];

   printf("%d %d %d\n", min, max, sum);

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:18: error: expected expression before '%' token
   10 |      scanf("%d", %m[i]);
      |                  ^
Language: C

#include<stdio.h>

int main()
{
   int n, i, min, max, sum=0;
   int m[1000];

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

   min = m[0];
   for (i=0; i<n; i++){
      if (m[i]<min)
         min = m[i];
   }

   max = m[0];
   for (i=0; i<n; i++){
      if (m[i]>max)
         max = m[i];
   }

   for (i=0; i<n; i++)
      sum = sum +m[i];

   printf("%d %d %d\n", min, max, sum);

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:19: error: expected expression before '%' token
   10 |       scanf("%d", %m[i]);
      |                   ^
Language: C

#include<stdio.h>

int main()
{
   int n, i, min, max
   long sum;
   int m[1000000];

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

   min = max = sum = m[0];

   for (i=1; i<n; i++){
      if (m[i]<min)
         min = m[i];
   }

   for (i=1; i<n; i++){
      if (m[i]>max)
         max = m[i];
   }

   for (i=1; i<n; i++)
      sum = sum + m[i];

   printf("%d %d %ld\n", min, max, sum);

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'long'
    6 |    long sum;
      |    ^~~~
main.c:13:10: error: 'max' undeclared (first use in this function)
   13 |    min = max = sum = m[0];
      |          ^~~
main.c:13:10: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:16: error: 'sum' undeclared (first use in this function)
   13 |    min = max = sum = m[0];
      |                ^~~