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:19: warning: extra tokens at end of #include directive
    1 | #include<stdio.h> int main(void){
      |                   ^~~
main.c:3:69: error: expected declaration specifiers or '...' before string constant
    3 |  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; }
      |                                                                     ^~~~
main.c:3:74: error: expected declaration specifiers or '...' before '&' token
    3 |  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; }
      |                                                                          ^
main.c:3:82: error: expected identifier or '(' before 'for'
    3 |  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; }
      |                                                                                  ^~~
main.c:3:91: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    3 |  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; }
      |                                                                                           ^
main.c:3:95: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
    3 |  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; }
      |                                                                                               ^~
main.c:3:277: error: expected declaration specifiers or '...' before string constant
    3 |  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; }
      |                                                                                                                                                                                                                                                                                     ^~~~~~~~~~~~
main.c:3:290: error: expected declaration specifiers or '...' before 'min'
    3 |  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; }
      |                                                                                                                                                                                                                                                                                                  ^~~
main.c:3:294: error: expected declaration specifiers or '...' before 'max'
    3 |  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; }
      |                                                                                                                                                                                                                                                                                                      ^~~
main.c:3:298: error: expected declaration specifiers or '...' before 'sum'
    3 |  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; }
      |                                                                                                                                                                                                                                                                                                          ^~~
main.c:3:309: error: expected identifier or '(' before 'return'
    3 |  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; }
      |                                                                                                                                                                                                                                                                                                                     ^~~~~~
main.c:3:319: error: expected identifier or '(' before '}' token
    3 |  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; }
      |                                                                                                                                                                                                                                                                                                                               ^