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

#include <stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:7:19: error: expected ';' before 'long'
    7 |  scanf("%ld",&tmp)
      |                   ^
      |                   ;
    8 |  long min=tmp,max=tmp,sum=tmp;
      |  ~~~~              
main.c:11:6: error: 'min' undeclared (first use in this function); did you mean 'main'?
   11 |   if(min>tmp){
      |      ^~~
      |      main
main.c:11:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:7: error: 'max' undeclared (first use in this function)
   13 |   }if(max<tmp){
      |       ^~~
main.c:16:3: error: 'sum' undeclared (first use in this function)
   16 |   sum=sum+tmp
      |   ^~~
main.c:16:14: error: expected ';' before '}' token
   16 |   sum=sum+tmp
      |              ^
      |              ;
   17 |  }
      |  ~
Language: C

#include<stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:12:20: error: 'num' undeclared (first use in this function); did you mean 'sum'?
   12 |                 if(num>max){
      |                    ^~~
      |                    sum
main.c:12:20: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<math.h>

int main(){

	int n,i,j,k;
	long a,min,max,sum;
	scanf("%d\n",&n);

	for(i=0; i<n; i++){
		scanf("%ld\n",&a);
	}

	min = a;
	for(i=0; i<n; i++){
		if(a<min)
			min = a;
	}

	max = a;
	for(j=0; j<n; j++){
		if(a>max)
			max = a;
	}

	sum = 0;

Compiler output:
main.c: In function 'main':
main.c:26:9: error: expected declaration or statement at end of input
   26 |         sum = 0;
      |         ^~~
Language: C

 #include<stdio.h>
int main()
{
  int a,sum=0,i,j,o=0;
  scanf("%d",&a);
  int b=[a];
  for(i=0;i<a;i++)
    {
      scanf("%d",&b[i]);
    }
  for(i=0;i<a;i++)
    {
      sum=sum+b[i];
    }
  for (i=0;i<(a-1);i++)
    {
      for(j=(a-1);j>i;j--)
	{
	  if(b[j-1]>b[j])
	    {
	      o=b[j-1];
	      b[j-1]=b[j];
	      b[j]=o;
	      
	    }
	  else o++;
	}
    }

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

Compiler output:
main.c: In function 'main':
main.c:6:9: error: expected expression before '[' token
    6 |   int b=[a];
      |         ^
main.c:9:20: error: subscripted value is neither array nor pointer nor vector
    9 |       scanf("%d",&b[i]);
      |                    ^
main.c:13:16: error: subscripted value is neither array nor pointer nor vector
   13 |       sum=sum+b[i];
      |                ^
main.c:19:15: error: subscripted value is neither array nor pointer nor vector
   19 |           if(b[j-1]>b[j])
      |               ^
main.c:19:22: error: subscripted value is neither array nor pointer nor vector
   19 |           if(b[j-1]>b[j])
      |                      ^
main.c:21:18: error: subscripted value is neither array nor pointer nor vector
   21 |               o=b[j-1];
      |                  ^
main.c:22:16: error: subscripted value is neither array nor pointer nor vector
   22 |               b[j-1]=b[j];
      |                ^
main.c:22:23: error: subscripted value is neither array nor pointer nor vector
   22 |               b[j-1]=b[j];
      |                       ^
main.c:23:16: error: subscripted value is neither array nor pointer nor vector
   23 |               b[j]=o;
      |                ^
main.c:30:24: error: subscripted value is neither array nor pointer nor vector
   30 |   printf("%d %d %d\n",b[0],b[a-1],sum);
      |                        ^
main.c:30:29: error: subscripted value is neither array nor pointer nor vector
   30 |   printf("%d %d %d\n",b[0],b[a-1],sum);
      |                             ^
Language: C

  
 #include<stdio.h>
int main()
{
  int a,b[],sum=0,i,j,o=0;
  scanf("%d",&a);
  for(i=0;i<a;i++)
    {
      scanf("%d",&b[i]);
    }
  for(i=0;i<a;i++)
    {
      sum=sum+b[i];
    }
  for (i=0;i<(a-1);i++)
    {
      for(j=(a-1);j>i;j--)
	{
	  if(b[j-1]>b[j])
	    {
	      o=b[j-1];
	      b[j-1]=b[j];
	      b[j]=o;
	      
	    }
	  else o++;
	}
    }

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

Compiler output:
main.c: In function 'main':
main.c:5:9: error: array size missing in 'b'
    5 |   int a,b[],sum=0,i,j,o=0;
      |         ^
Language: C

#include <stdio.h>
int main()
{
  int ai,a,n;
  long iong max,min,sum;

   min=1000000;
   max=-1000000;

   scanf("%d",&n);
   sum=0;

  for(a=1;n>=a;a++){
    scanf("%d",&ai);   
  if(min>=ai) min=ai;
  else if(max<=ai) max=ai;
   sum=ai+sum;
  }

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

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'max'
    5 |   long iong max,min,sum;
      |             ^~~
main.c:5:13: error: 'max' undeclared (first use in this function)
main.c:5:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:17: error: 'min' undeclared (first use in this function); did you mean 'main'?
    5 |   long iong max,min,sum;
      |                 ^~~
      |                 main
main.c:5:21: error: 'sum' undeclared (first use in this function)
    5 |   long iong max,min,sum;
      |                     ^~~
Language: C

#include <stdio.h>
int main()
{
  int a,n;
  long iong ai, max,min,sum;

   min=1000000;
   max=-1000000;

   scanf("%d",&n);
   sum=0;

  for(a=1;n>=a;a++){
    scanf("%lld",&ai);   
  if(min>=ai) min=ai;
  else if(max<=ai) max=ai;
   sum=ai+sum;
  }

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

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ai'
    5 |   long iong ai, max,min,sum;
      |             ^~
main.c:5:13: error: 'ai' undeclared (first use in this function); did you mean 'a'?
    5 |   long iong ai, max,min,sum;
      |             ^~
      |             a
main.c:5:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:17: error: 'max' undeclared (first use in this function)
    5 |   long iong ai, max,min,sum;
      |                 ^~~
main.c:5:21: error: 'min' undeclared (first use in this function); did you mean 'main'?
    5 |   long iong ai, max,min,sum;
      |                     ^~~
      |                     main
main.c:5:25: error: 'sum' undeclared (first use in this function)
    5 |   long iong ai, max,min,sum;
      |                         ^~~
Language: C

#include <stdio.h>
int main()
{
  int a,n,ai;
  long long max,min,sum;

   min=1000000;
   max#include <stdio.h>
int main()
{
  int a,n,ai;
  long long max,min,sum;

   min=1000000;
   max=-1000000;

   scanf("%d",&n);
   sum=0;

  for(a=1;n>=a;a++){
    scanf("%d",&ai);   
    if(min>=ai) min=ai;
    if(max<=ai) max=ai;
    sum=ai+sum;
  }

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

  return 0;
}
=-1000000;

   scanf("%d",&n);
   sum=0;

  for(a=1;n>=a;a++){
    scanf("%d",&ai);   
    if(min>=ai) min=ai;
    if(max<=ai) max=ai;
    sum=ai+sum;
  }

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

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:7: error: stray '#' in program
    8 |    max#include <stdio.h>
      |       ^
main.c:8:7: error: expected ';' before 'include'
    8 |    max#include <stdio.h>
      |       ^~~~~~~~
      |       ;
Language: C

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

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

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

Compiler output:
main.c: In function 'main':
main.c:11:32: error: 'iong' undeclared (first use in this function)
   11 |                         sum = (iong)ai;
      |                                ^~~~
main.c:11:32: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:37: error: expected ';' before 'ai'
   11 |                         sum = (iong)ai;
      |                                     ^~
      |                                     ;
Language: C

#include<stdio.h>

int main(void)

{

    int n;

    int ai[n];

    int min;

    int max;

    long int sum = 0;

    int i;

    scanf("%d", &n);

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

    {

        scanf("%d ", ai[i]);

        if(i == 1)

        {

            min = ai[1];

            max = ai[1];

        }

        if(ai[i] < min)

        {

            min = ai[i];

        }

        if(ai[i] > max)

        {

            max = ai[i];

        }

        sum += ai[i];

    }

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

    returm 0;

}

Compiler output:
main.c: In function 'main':
main.c:59:5: error: 'returm' undeclared (first use in this function)
   59 |     returm 0;
      |     ^~~~~~
main.c:59:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:59:11: error: expected ';' before numeric constant
   59 |     returm 0;
      |           ^~
      |           ;
Language: C

#include<stdio.h>

int main(void)
{
    int n;
    int ai[n];
    int min;
    int max;
    long int sum = 0;
    int i;
    scanf("%d", &n);

    for(i = 0; i < n; i++)
    {
        scanf("%d ", ai[i]);
        if(i == 0)
        {
            min = ai[0];
            max = ai[0];
        }
        
        if(ai[i] < min)
        {
            min = ai[i];
        }
        
        if(ai[i] > max)
        {
            max = ai[i];
        }
        
        sum += ai[i];
    }
    printf("%d %d %ld\n", min, max, sum);
    returm 0;
}

Compiler output:
main.c: In function 'main':
main.c:35:5: error: 'returm' undeclared (first use in this function)
   35 |     returm 0;
      |     ^~~~~~
main.c:35:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:35:11: error: expected ';' before numeric constant
   35 |     returm 0;
      |           ^~
      |           ;
Language: C

#include<stdio.h>

int main(void)
{
    int n;
    int ai[n];
    int min;
    int max;
    long int sum = 0;
    int i;
    scanf("%d", &n);

    for(i = 0; i < n; i++)
    {
        scanf("%d ", &ai[i]);
        if(i == 0)
        {
            min = ai[0];
            max = ai[0];
        }
        
        if(ai[i] < min)
        {
            min = ai[i];
        }
        
        if(ai[i] > max)
        {
            max = ai[i];
        }
        
        sum += ai[i];
    }
    printf("%d %d %ld\n", min, max, sum);
    returm 0;
}

Compiler output:
main.c: In function 'main':
main.c:35:5: error: 'returm' undeclared (first use in this function)
   35 |     returm 0;
      |     ^~~~~~
main.c:35:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:35:11: error: expected ';' before numeric constant
   35 |     returm 0;
      |           ^~
      |           ;
Language: C

#include<stdio.h>

int main(void)
{
    int n;
    int min;
    int max;
    long int sum = 0;
    int i;
    scanf("%d", &n);
    if(n != 0)
    {
    int ai[n];
    }

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

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

#include<stdio.h>

int main(void){
int a[10000]
int n;
int i;
long s=0;
int h,l;

scanf("%d",&n);

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

l =100001
h=-100001

for(i=0,i<n,i++){
if(l>a[i])l ==a[i];
if(h<a(i))h==a[i];
}

printf("%d %d %ld\n",h, l,s);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:13: error: expected ';' before 'int'
    4 | int a[10000]
      |             ^
      |             ;
    5 | int n;
      | ~~~          
main.c:12:19: error: expected ';' before ')' token
   12 | for(i =0, i<n, i++){
      |                   ^
      |                   ;
main.c:12:19: error: expected expression before ')' token
main.c:13:13: error: 'a' undeclared (first use in this function)
   13 | scanf("%d",&a[i])
      |             ^
main.c:13:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:18: error: expected ';' before 's'
   13 | scanf("%d",&a[i])
      |                  ^
      |                  ;
   14 | s += a[i]
      | ~                 
main.c:17:10: error: expected ';' before 'h'
   17 | l =100001
      |          ^
      |          ;
   18 | h=-100001
      | ~
Language: C

#include<stdio.h>

int main(void){
int a[10000];
int n;
int i;
long s=0;
int h,l;

scanf("%d",&n);

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

l =100001;
h=-100001;

for(i=0,i<n,i++){
if(l>a[i])l ==a[i];
if(h<a(i))h==a[i];
}

printf("%d %d %ld\n",h, l,s);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:19: error: expected ';' before ')' token
   12 | for(i =0, i<n, i++){
      |                   ^
      |                   ;
main.c:12:19: error: expected expression before ')' token
main.c:20:16: error: expected ';' before ')' token
   20 | for(i=0,i<n,i++){
      |                ^
      |                ;
main.c:20:16: error: expected expression before ')' token
main.c:22:6: error: called object 'a' is not a function or function pointer
   22 | if(h<a(i))h==a[i];
      |      ^
main.c:4:5: note: declared here
    4 | int a[10000];
      |     ^
Language: C

#include<stdio.h>

int main(void){
int a[10000];
int n;
int i;
long s=0;
int h,l;

scanf("%d",&n);

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

l =100001;
h=-100001;

for(i=0;i<n;i++){
if(l>a[i])l ==a[i];
if(h<a(i))h==a[i];
}

printf("%d %d %ld\n",l, h,s);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:6: error: called object 'a' is not a function or function pointer
   22 | if(h<a(i))h==a[i];
      |      ^
main.c:4:5: note: declared here
    4 | int a[10000];
      |     ^
Language: C

#include<stdio.h>

int main(void){
int a[10000];
int n;
int i;
long s=0;
int h,l;

scanf("%d",&n);

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

l =100001;
h=-100001;

for(i=0;i<n;i++){
if(l>a[i])l =a[i];
if(h<a(i))h=a[i];
}

printf("%d %d %ld\n",l, h,s);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:6: error: called object 'a' is not a function or function pointer
   22 | if(h<a(i))h=a[i];
      |      ^
main.c:4:5: note: declared here
    4 | int a[10000];
      |     ^
Language: C

#include <stdio.h>

int main(void)

{

int n,ai;

scanf("%d",&n);

for(ai=1;ai<=n;ai++){

printf("%d %d %d",ai,n,ai++");

}

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:13:28: warning: missing terminating " character
   13 | printf("%d %d %d",ai,n,ai++");
      |                            ^
main.c:13:28: error: missing terminating " character
   13 | printf("%d %d %d",ai,n,ai++");
      |                            ^~~
main.c:13:28: error: expected ')' before '}' token
   13 | printf("%d %d %d",ai,n,ai++");
      |       ~                    ^
      |                            )
   14 | 
   15 | }
      | ~                           
main.c:13:28: error: expected ';' before '}' token
   13 | printf("%d %d %d",ai,n,ai++");
      |                            ^
      |                            ;
   14 | 
   15 | }
      | ~
Language: C

#include <stdio.h>

int main(void)

{

int n,a;

scanf("%d",&n);

for(a=1;a<=n;a++){

printf("%d %d %d",a,n,a++");

}

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:13:26: warning: missing terminating " character
   13 | printf("%d %d %d",a,n,a++");
      |                          ^
main.c:13:26: error: missing terminating " character
   13 | printf("%d %d %d",a,n,a++");
      |                          ^~~
main.c:13:26: error: expected ')' before '}' token
   13 | printf("%d %d %d",a,n,a++");
      |       ~                  ^
      |                          )
   14 | 
   15 | }
      | ~                         
main.c:13:26: error: expected ';' before '}' token
   13 | printf("%d %d %d",a,n,a++");
      |                          ^
      |                          ;
   14 | 
   15 | }
      | ~
Language: C

#include <stdio.h>

int main(void)

{

int n,ai;

scanf("%d",&n);

for(ai=1;ai<=n;ai++){

ai=ai++;

}

printf("1 %d %d\n",n,ai);

}

return 0;

}

Compiler output:
main.c:21:1: error: expected identifier or '(' before 'return'
   21 | return 0;
      | ^~~~~~
main.c:23:1: error: expected identifier or '(' before '}' token
   23 | }
      | ^
Language: C

#include <stdio.h>

int main(void)

{

int n,ai;

scanf("%d",&n);

for(ai=1;ai<=n;ai++){

ai=ai+1;

}

printf("1 %d %d\n",n,ai);

}

return 0;

}

Compiler output:
main.c:21:1: error: expected identifier or '(' before 'return'
   21 | return 0;
      | ^~~~~~
main.c:23:1: error: expected identifier or '(' before '}' token
   23 | }
      | ^
Language: C

#include <stdio.h>

int main (void)


{


int n,ai,i,x,y,z;
n=0;
ai=0;
i=0;
x=0;
y=0;
z=0;
scanf("%d",&n);


for("i=1;i<n;i++)


{


scanf("%d",&ai);


if(ai>x)


{


x=ai;


}


if(ai<y)


{


y=ai;


}


z=z+ai;


}


printf("%d %d %d\n",y,x,z);


return 0;


}

Compiler output:
main.c: In function 'main':
main.c:19:5: warning: missing terminating " character
   19 | for("i=1;i<n;i++)
      |     ^
main.c:19:5: error: missing terminating " character
   19 | for("i=1;i<n;i++)
      |     ^~~~~~~~~~~~~
main.c:22:1: error: expected expression before '{' token
   22 | {
      | ^
main.c:61:1: error: expected expression before 'return'
   61 | return 0;
      | ^~~~~~
main.c:64:1: error: expected expression before '}' token
   64 | }
      | ^
main.c:64:1: error: expected expression before '}' token
Language: C

#include <stdio.h>

int main (void)


{


int n,ai,i,x,y,z;
ai=0;
i=0;
x=0;
y=0;
z=0;
scanf("%d",&n);


for("i=1;i<n;i++)


{


scanf("%d",&ai);


if(ai>x)


{


x=ai;


}


if(ai<y)


{


y=ai;


}


z=z+ai;


}


printf("%d %d %d\n",y,x,z);


return 0;


}

Compiler output:
main.c: In function 'main':
main.c:18:5: warning: missing terminating " character
   18 | for("i=1;i<n;i++)
      |     ^
main.c:18:5: error: missing terminating " character
   18 | for("i=1;i<n;i++)
      |     ^~~~~~~~~~~~~
main.c:21:1: error: expected expression before '{' token
   21 | {
      | ^
main.c:60:1: error: expected expression before 'return'
   60 | return 0;
      | ^~~~~~
main.c:63:1: error: expected expression before '}' token
   63 | }
      | ^
main.c:63:1: error: expected expression before '}' token
Language: C

#include <stdio.h>

int main (void)


{


int n,ai,i,x,y,z;


x=-1000000;


y=1000000;


scanf("%d",&n);


for("i=1;i<n;i++)


{


scanf("%d",&ai);


if(ai>x)


{


x=ai;


}


if(ai<y)


{


y=ai;


}


z=z+ai;


}


printf("%d %d %d\n",y,x,z);


return 0;


}

Compiler output:
main.c: In function 'main':
main.c:21:5: warning: missing terminating " character
   21 | for("i=1;i<n;i++)
      |     ^
main.c:21:5: error: missing terminating " character
   21 | for("i=1;i<n;i++)
      |     ^~~~~~~~~~~~~
main.c:24:1: error: expected expression before '{' token
   24 | {
      | ^
main.c:63:1: error: expected expression before 'return'
   63 | return 0;
      | ^~~~~~
main.c:66:1: error: expected expression before '}' token
   66 | }
      | ^
main.c:66:1: error: expected expression before '}' token
Language: C

#include <stdio.h>

int main (void)


{


int n,ai,i,x,y,z;


x=-1000000;


y=1000000;
z=0;


scanf("%d",&n);


for("i=1;i<n;i++)


{


scanf("%d",&ai);


if(ai>x)


{


x=ai;


}


if(ai<y)


{


y=ai;


}


z=z+ai;


}


printf("%d %d %d\n",y,x,z);


return 0;


}

Compiler output:
main.c: In function 'main':
main.c:22:5: warning: missing terminating " character
   22 | for("i=1;i<n;i++)
      |     ^
main.c:22:5: error: missing terminating " character
   22 | for("i=1;i<n;i++)
      |     ^~~~~~~~~~~~~
main.c:25:1: error: expected expression before '{' token
   25 | {
      | ^
main.c:64:1: error: expected expression before 'return'
   64 | return 0;
      | ^~~~~~
main.c:67:1: error: expected expression before '}' token
   67 | }
      | ^
main.c:67:1: error: expected expression before '}' token
Language: C

#include <stdio.h>

int main (void)


{


int n,ai,i,x,y,z;


x=1000000;


y=1000000;
z=0;


scanf("%d",&n);


for("i=1;i<n;i++)


{


scanf("%d",&ai);


if(ai>x)


{


x=ai;


}


if(ai<y)


{


y=ai;


}


z=z+ai;


}


printf("%d %d %d\n",y,x,z);


return 0;


}

Compiler output:
main.c: In function 'main':
main.c:22:5: warning: missing terminating " character
   22 | for("i=1;i<n;i++)
      |     ^
main.c:22:5: error: missing terminating " character
   22 | for("i=1;i<n;i++)
      |     ^~~~~~~~~~~~~
main.c:25:1: error: expected expression before '{' token
   25 | {
      | ^
main.c:64:1: error: expected expression before 'return'
   64 | return 0;
      | ^~~~~~
main.c:67:1: error: expected expression before '}' token
   67 | }
      | ^
main.c:67:1: error: expected expression before '}' token
Language: C

#include <stdio.h>

int main(void)


{


    int i,n,min,max,sum,ai;


    sum=0;


    scanf("%d",&n);


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


        printf("%d ",i+1);


        scanf("%d",&ai);


    }


    min=max=a0;


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


        if(ai<min){


            min=ai;


        }


        if(ai>max){


            max=ai;


        }


    }


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


        sum=sum+ai;


    }

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


    return 0;


}

Compiler output:
main.c: In function 'main':
main.c:30:13: error: 'a0' undeclared (first use in this function); did you mean 'ai'?
   30 |     min=max=a0;
      |             ^~
      |             ai
main.c:30:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(void)


{


    int i,n,min,max,sum,a[i];


    sum=0;


    scanf("%d",&n);


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


        printf("%d ",i+1);


        scanf("%d",&ai);


    }


    min=max=ai


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


        if(ai<min){


            min=ai;


        }


        if(ai>max){


            max=ai;


        }


    }


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


        sum=sum+ai;


    }

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


    return 0;


}

Compiler output:
main.c: In function 'main':
main.c:24:21: error: 'ai' undeclared (first use in this function); did you mean 'a'?
   24 |         scanf("%d",&ai);
      |                     ^~
      |                     a
main.c:24:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:30:15: error: expected ';' before 'for'
   30 |     min=max=ai
      |               ^
      |               ;
......
   33 |     for(i=1;i<n;i++){
      |     ~~~
Language: C

#include <stdio.h>

int main(void)

{

    int i,n,min,max,sum,a[i];

    sum=0;

    scanf("%d",&n);

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

        printf("%d ",i+1);

        scanf("%d",&a[i]);

    }

    min=max=a[0]

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

        if(a[i]<min){

            min=a[i];

        }

        if(a[i]>max){

            max=a[i];

        }

    }

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

        sum=sum+a[i];

    }

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

    return 0;

}

Compiler output:
main.c: In function 'main':
main.c:21:17: error: expected ';' before 'for'
   21 |     min=max=a[0]
      |                 ^
      |                 ;
   22 | 
   23 |     for(i=1;i<n;i++){
      |     ~~~
Language: C

#include <stdio.h>

int main(void)

{

    int i,n,min,max,sum,ai;

    sum=0;

    scanf("%d",&n);

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

        printf("%d ",i+1);

        scanf("%d",&ai);

    }

    min=max=0

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

        if(ai<min){

            min=ai;

        }

        if(ai>max){

            max=ai;

        }

    }

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

        sum=sum+ai;

    }

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

    return 0;

}

Compiler output:
main.c: In function 'main':
main.c:21:14: error: expected ';' before 'for'
   21 |     min=max=0
      |              ^
      |              ;
   22 | 
   23 |     for(i=1;i<n;i++){
      |     ~~~
Language: C

#include<stdio.h>
int main(void){
int i,n,x;
scanf("%d",&n)
for(i = 1; i <= n; i++)
{
scanf("%d",&x);
}

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:15: error: expected ';' before 'for'
    4 | scanf("%d",&n)
      |               ^
      |               ;
    5 | for(i = 1; i <= n; i++)
      | ~~~
Language: C

#intclude<stdio.h>
int main(void)
{
	long a,b,c,d=1000000,e=???1000000,f=0;
	scanf("%d",&a);
	for(b=1;b<=a;b++){
		scanf("%d"&c);
		if(d>c){
			d=c;
		}
		if(e<c){
			e=c;
		}
		f+=c;
	}
	printf("%d %d %d",d,e,f);
	return 0;
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #intclude; did you mean #include?
    1 | #intclude<stdio.h>
      |  ^~~~~~~~
      |  include
main.c: In function 'main':
main.c:4:32: error: expected expression before '?' token
    4 |         long a,b,c,d=1000000,e=???1000000,f=0;
      |                                ^
main.c:4:43: error: 'f' undeclared (first use in this function)
    4 |         long a,b,c,d=1000000,e=???1000000,f=0;
      |                                           ^
main.c:4:43: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    5 |         scanf("%d",&a);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #intclude<stdio.h>
main.c:5:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    5 |         scanf("%d",&a);
      |         ^~~~~
main.c:5:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:27: error: invalid operands to binary & (have 'char *' and 'long int')
    7 |                 scanf("%d"&c);
      |                       ~~~~^
      |                       |
      |                       char *
main.c:16:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   16 |         printf("%d %d %d",d,e,f);
      |         ^~~~~~
main.c:16:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:16:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:16:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

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

}

Compiler output:
main.c: In function 'main':
main.c:9:29: error: 'i' undeclared (first use in this function)
    9 |                 scanf("%d",&i);
      |                             ^
main.c:9:29: 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,b,c,i;


long d=0;


b=-1000000;


c=1000000;


scanf("%d"&n);


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


scanf("%d",&i);


if(b<i){


b=i;


}


if(c>i){


c=i;


}


d+=i;


}


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


return 0;


}

Compiler output:
main.c: In function 'main':
main.c:18:11: error: invalid operands to binary & (have 'char *' and 'int')
   18 | scanf("%d"&n);
      |       ~~~~^
      |       |
      |       char *
Language: C

#include<stdio.h>

int main(void){

long lomg int n, a, i, max, min, sun;


scanf("%lld",&n);

scanf("%lld",&a);


max=a;


min=a;


sum=a;


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


scanf("%lld",&a);


if(max<a){


max=a;


}


else if(max>a){


min=a;


}


sum+=a;


}


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


return 0;


}

Compiler output:
main.c: In function 'main':
main.c:5:10: error: expected ';' before 'int'
    5 | long lomg int n, a, i, max, min, sun;
      |          ^~~~
      |          ;
main.c:19:1: error: 'sum' undeclared (first use in this function); did you mean 'sun'?
   19 | sum=a;
      | ^~~
      | sun
main.c:19:1: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void){

long lomg int n, a, i, max, min, sun;


scanf("%lld",&n);

scanf("%lld",&a);


max=a;


min=a;


sum=a;


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


scanf("%lld",&a);


if(max<a){


max=a;


}


else if(max>a){


min=a;


}


sum+=a;


}


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


return 0;


}

Compiler output:
main.c: In function 'main':
main.c:5:10: error: expected ';' before 'int'
    5 | long lomg int n, a, i, max, min, sun;
      |          ^~~~
      |          ;
main.c:19:1: error: 'sum' undeclared (first use in this function); did you mean 'sun'?
   19 | sum=a;
      | ^~~
      | sun
main.c:19:1: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main()
{
    int a;
    int b = 0;
    int c = 1000000;
    int d = 0;
    int e;

    scanf("%d"&a);
    for(int i=0;i<a;i++)
    {
        scanf("%d",&e)
        if(e<c) c = e;
        if(e>b) b = e;
        d = d + e;
    }
    printf("%d\n",c,b,d);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:15: error: invalid operands to binary & (have 'char *' and 'int')
   11 |     scanf("%d"&a);
      |           ~~~~^
      |           |
      |           char *
main.c:14:23: error: expected ';' before 'if'
   14 |         scanf("%d",&e)
      |                       ^
      |                       ;
   15 |         if(e<c) c = e;
      |         ~~
Language: C

#include <stdio.h>

int main()
{
    int a;
    int b = 0;
    int c = 1000000;
    int d = 0;
    int e;

    scanf("%d\n"&a);
    for(int i=0;i<a;i++)
    {
        scanf("%d",&e)
        if(e<c) c = e;
        if(e>b) b = e;
        d = d + e;
    }
    printf("%d\n",c,b,d);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:17: error: invalid operands to binary & (have 'char *' and 'int')
   11 |     scanf("%d\n"&a);
      |           ~~~~~~^
      |           |
      |           char *
main.c:14:23: error: expected ';' before 'if'
   14 |         scanf("%d",&e)
      |                       ^
      |                       ;
   15 |         if(e<c) c = e;
      |         ~~
Language: C

#include <stdio.h>

int main()
{
    int a;
    int b = 0;
    int c = 1000000;
    int d = 0;
    int e;

    scanf("%d\n",&a);
    for(int i=0;i<a;i++)
    {
        scanf("%d",&e)
        if(e<c) c = e;
        if(e>b) b = e;
        d = d + e;
    }
    printf("%d\n",c,b,d);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:23: error: expected ';' before 'if'
   14 |         scanf("%d",&e)
      |                       ^
      |                       ;
   15 |         if(e<c) c = e;
      |         ~~
Language: C

#include <stdio.h>

int main(void){

int a,b,c,n,x;

x=0;

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

for(n=a;n==b;n++){

if(n%d==0){

x = x+1;

};

};

return 0;

};

Compiler output:
main.c: In function 'main':
main.c:13:6: error: 'd' undeclared (first use in this function)
   13 | if(n%d==0){
      |      ^
main.c:13:6: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(void) {
	int x,k, a[10000] = {0};
	int max = -10001, min = 10001, sum = 0;
	scanf("%d", &k);
	
	
	for(x=0;x<k;x++){
		scanf("%d",a[x]);
		if(a[x]>max) max=a[x];
		if(a[x]<min) min=a[x];
		sum+=a[x];
	}
	
	printf("%d %d %d\n" min, max, sum);
	
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:28: error: expected ')' before 'min'
   16 |         printf("%d %d %d\n" min, max, sum);
      |               ~            ^~~~
      |                            )
Language: C

#include <stdio.h>
#include<math.h>
int main(void) {
	double s[10001],n,a,max,min,sum;
	scanf("%lf",&n);
	max=-1;
	min=1;
	sum=0;
	for(a=0;a<n;a++){
		scanf("%lf",&s[a]);
		if(s[a]>max){max=s[a];}
		if(s[a]<min){min=s[a];}
		sum=sum+s[a];
	}
	printf("%.0lf %.0lf %.0lf\n",min,max,sum);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:31: error: array subscript is not an integer
   10 |                 scanf("%lf",&s[a]);
      |                               ^
main.c:11:21: error: array subscript is not an integer
   11 |                 if(s[a]>max){max=s[a];}
      |                     ^
main.c:11:35: error: array subscript is not an integer
   11 |                 if(s[a]>max){max=s[a];}
      |                                   ^
main.c:12:21: error: array subscript is not an integer
   12 |                 if(s[a]<min){min=s[a];}
      |                     ^
main.c:12:35: error: array subscript is not an integer
   12 |                 if(s[a]<min){min=s[a];}
      |                                   ^
main.c:13:26: error: array subscript is not an integer
   13 |                 sum=sum+s[a];
      |                          ^
Language: C

#include <stdio.h>
int main()
{
    int i,n,x,min,max;
    double sum=0;
    max = -1000000;
    min = 1000000;
    scanf("%d\n",&x);
    for(i=0;i<x;i++){
          scanf("%d ",n);
          if(b>max){
               max=b;
          }
          if(b<min){
               min=b;
          }
          sum+=b;
    }
    printf("%d %d %f\n",min,max,sum);
    
    return 0;
}
    

Compiler output:
main.c: In function 'main':
main.c:11:14: error: 'b' undeclared (first use in this function)
   11 |           if(b>max){
      |              ^
main.c:11:14: 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,min,max;
    double sum=0;
    max = -1000000;
    min = 1000000;
    scanf("%d\n",&x);
    for(i=0;i<x;i++){
          scanf("%d ",&n);
          if(b>max){
               max=b;
          }
          if(b<min){
               min=b;
          }
          sum+=b;
    }
    printf("%d %d %f\n",min,max,sum);
    
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:14: error: 'b' undeclared (first use in this function)
   11 |           if(b>max){
      |              ^
main.c:11:14: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void) {
int n;
int x,y;
int num;
int total;
int a[];

scanf("%d", &n);
for (x = 0; x < n; x++) {
scanf("%d", &a[x]);
total = a[x];
for(y = x-1; y < 0; y--) {
if (a[x] < a[y]) {
num = a[x];
a[x] = a[y];
a[y] = num;
}
}
}
printf("%d %d %d", a[0], a[n-1], total);

return (0);
}

Compiler output:
main.c: In function 'main':
main.c:8:5: error: array size missing in 'a'
    8 | int a[];
      |     ^
Language: C

#include<stdio.h>

int main(void) {
int n;
int x,y;
int num;
int total;
int a[];

scanf("%d", &n);
for (x = 0; x < n; x++) {
scanf("%d", &a[x]);
total = a[x];
for(y = x-1; y < 0; y--) {
if (a[x] < a[y]) {
num = a[x];
a[x] = a[y];
a[y] = num;
}
}
}
printf("%d %d %d\n", a[0], a[n-1], total);

return (0);
}

Compiler output:
main.c: In function 'main':
main.c:8:5: error: array size missing in 'a'
    8 | int a[];
      |     ^
Language: C

#include <stdio.h>

int main(void)
{
	int n,i,c_max,c_min;
	long long_c_sum = 0;
	int c[10000];
	
	scanf("%d\n",&n);
	
	for(i=0;i<n;i++){
	scanf("%d",&c[i]);
	}
	c_max = c[0];
	c_min = c[0];
	for(i=1;i<n;i++){
		if(c_max < c[i]){
			c_max = c[i];
		}
		if(c_min > c[i]){
			c_min = c[i];
		}
	}
	for(i=0;i<n;i++){
		c_sum = c_sum + c[i];
	}	
		printf("%d %d %lld\n",c_min,c_max,c_sum);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:25:17: error: 'c_sum' undeclared (first use in this function)
   25 |                 c_sum = c_sum + c[i];
      |                 ^~~~~
main.c:25: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,i,c_max,c_min;
	long long_c_sum = 0;
	int c[10000];
	
	scanf("%d\n",&n);
	
	for(i=0;i<n;i++){
	scanf("%d",&c[i]);
	}
	c_max = c[0];
	c_min = c[0];
	for(i=1;i<n;i++){
		if(c_max < c[i]){
			c_max = c[i];
		}
		if(c_min > c[i]){
			c_min = c[i];
		}
	}
	for(i=0;i<n;i++){
		c_sum = c_sum + c[i];
	}	
		printf("%d %d %lld\n",c_min,c_max,lomg_c_sum);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:25:17: error: 'c_sum' undeclared (first use in this function)
   25 |                 c_sum = c_sum + c[i];
      |                 ^~~~~
main.c:25:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:27:51: error: 'lomg_c_sum' undeclared (first use in this function); did you mean 'long_c_sum'?
   27 |                 printf("%d %d %lld\n",c_min,c_max,lomg_c_sum);
      |                                                   ^~~~~~~~~~
      |                                                   long_c_sum
Language: C

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

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

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

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

#include <stdio.h>

 int main(void)
 {

 int a[10000], min, max, n, i;
 int sum = 0;
 
scanf("%d", &n);


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

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

 }

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

#include <stdio.h> 

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

	scanf("%d",&n);

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

		if(a[i] < min)
		{
			min = a[i]
		}
		if(a[i] > max)
		{
			max = a[i];
		}
	
		sum = sum + a[i];
	 }
	 
	printf("%d %d %lld\n", min, max, sum);

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:21:35: error: expected ';' before '}' token
   21 |                         min = a[i]
      |                                   ^
      |                                   ;
   22 |                 }
      |                 ~
Language: C

#include <stdio.h>
int n;
long a;
long b;
long max = -1000000;
long min = 1000000;
long sum = 0;

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

 return 0;
}

Compiler output:
main.c:9:1: error: return type defaults to 'int' [-Wimplicit-int]
    9 | main(){
      | ^~~~
Language: C

#include <stdio.h>
int n;
long a;
long b;
long max = -1000000;
long min = 1000000;
long sum = 0;

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

 return 0;
}

Compiler output:
main.c:9:1: error: return type defaults to 'int' [-Wimplicit-int]
    9 | main(){
      | ^~~~
Language: C

#include <stdio.h>
unsigned int n;
int i;
long a;
long max = -1000000;
long min = 1000000;
long sum = 0;

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

 return 0;
}

Compiler output:
main.c:9:1: error: return type defaults to 'int' [-Wimplicit-int]
    9 | main(){
      | ^~~~
main.c: In function 'main':
main.c:20:2: error: expected statement before ']' token
   20 |  ]
      |  ^
main.c:24:1: error: expected declaration or statement at end of input
   24 | }
      | ^
Language: C

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

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

#include<stdio.h>

int main(void)


{


 int n, i, ai, min, max, sum;


 sum = 0;


 min = 10000;


 max = -10000;


 scanf("%d",&n);


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


 {


  scanf("%d",ai);


  sum+ = ai;


  if(min > ai){


   min = ai;


  }


  if(max < ai){


    max = ai;


  }

 }


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


 return 0;


}

Compiler output:
main.c: In function 'main':
main.c:33:8: error: expected expression before '=' token
   33 |   sum+ = ai;
      |        ^
Language: C

#include<stdio.h>
int main(void)
{

 int n, i, ai, min, max, sum;

 sum = 0;

 min = 10000;

 max = -10000;

 scanf("%d",&n);

 for(i = 1; i <= n; i++)
 {
  scanf("%d",ai);

  sum+ = ai;

  if(min > ai){
   min = ai;
  }

  if(max < ai){
    max = ai;
  }
 }
 printf("%d %d %d\n",min, max, sum);

 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:8: error: expected expression before '=' token
   19 |   sum+ = ai;
      |        ^
Language: C

#include<stdio.h>

int main(void)

{

 int n, i, ai, min, max, sum;

 sum = 0;

 min = 10000;

 max = -10000;

 scanf("%d",&n);

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

 {

  scanf("%d",ai);

  sum+ = ai;

  if(min > ai){

   min = ai;

  }

  if(max < ai){

    max = ai;

  }

 }

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

 return 0;

}

Compiler output:
main.c: In function 'main':
main.c:23:8: error: expected expression before '=' token
   23 |   sum+ = ai;
      |        ^
Language: C

#include<stdio.h>

int main(void)

{

 int n, i, ai, min, max, sum;

 sum = 0;

 min = 1000000;

 max = -1000000;

 scanf("%d",&n);

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

 {

  scanf("%d",ai);

  sum+ = ai;

  if(min > ai){

   min = ai;

  }

  if(max < ai){

    max = ai;

  }

 }

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

 return 0;

}

Compiler output:
main.c: In function 'main':
main.c:23:8: error: expected expression before '=' token
   23 |   sum+ = ai;
      |        ^
Language: C

#include<stdio.h>

int main(void)

{

 int n, i, ai, min, max, sum;

 sum = 0;

 min = 1000000;

 max = -1000000;

 scanf("%d",&n);

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

 {

  scanf("%d",&ai);

  sum+ = ai;

  if(min > ai){

   min = ai;

  }

  if(max < ai){

    max=ai;

  }

 }

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

 return 0;

}

Compiler output:
main.c: In function 'main':
main.c:23:8: error: expected expression before '=' token
   23 |   sum+ = ai;
      |        ^
Language: C

include<stdio.h>

int main(void){


int i,n;


int number;


int sum=0;


int min=0;


int max=0;


scanf("%d",&n);


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


{


scanf("%d",&number);


if(i==0){


min = number;


max = number;


}


if(number<min)


min = number;


if(number < max)


max = number;


sum += number;


}


printf("%d %d %d\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

include<stdio.h>

int main(void){


int i,n;


int number;


int sum=0;


int min=0;


int max=0;


scanf("%d",&n);


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


{


scanf("%d",&number);


if(i==0){


min = number;


max = number;


}


if(number<min)


min = number;


if(number<max)


max = number;


sum += number;


}


printf("%d %d %d\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

#include <stdio.h>

int main(void){


    int n,a[i],max,min,sum;

    max=0;


    min=0;


    sum=0;


    scanf("%d",&n);


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


        scanf("%d",&a[i]);


        max=a[i];


        if(a[i]>max){


            max=a[i];


        }


        if(a[i]<min){


            min=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:13: error: 'i' undeclared (first use in this function)
    6 |     int n,a[i],max,min,sum;
      |             ^
main.c:6:13: 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[i],max,min,sum;

    max=0;


    min=0;


    sum=0;


    scanf("%d",&n);


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


        scanf("%d",&a[i]);


        max=a[i];


        if(a[i]>max){


            max=a[i];


        }


        if(a[i]<min){


            min=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:13: error: 'i' undeclared (first use in this function)
    6 |     int n,a[i],max,min,sum;
      |             ^
main.c:6:13: 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[i],max,min,sum;

    max=0;


    min=0;


    sum=0;


    scanf("%d",&n);


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


        scanf("%d",&a[i]);


        max=a[i];


        if(a[i]>max){


            max=a[i];


        }


        if(a[i]<min){


            min=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:13: error: 'i' undeclared (first use in this function)
    6 |     int n,a[i],max,min,sum;
      |             ^
main.c:6:13: 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[i],min,max,sum;


    min=0;


    max=0;


    sum=0;


    scanf("%d",&n);


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


        scanf("%d",&a[i]);


        if(a[i]<min){


            min=a[i];


        }


        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:6:13: error: 'i' undeclared (first use in this function)
    6 |     int n,a[i],min,max,sum;
      |             ^
main.c:6:13: note: each undeclared identifier is reported only once for each function it appears in