Language: C

int n,i,min,max;

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

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

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

Compiler output:
main.c:5:1: warning: data definition has no type or storage class
    5 | sum = 0;
      | ^~~
main.c:5:1: error: type defaults to 'int' in declaration of 'sum' [-Wimplicit-int]
main.c:5:1: error: conflicting types for 'sum'; have 'int'
main.c:3:6: note: previous declaration of 'sum' with type 'long int'
    3 | long sum;
      |      ^~~
main.c:9:7: error: expected declaration specifiers or '...' before string constant
    9 | scanf("%d",&n);
      |       ^~~~
main.c:9:12: error: expected declaration specifiers or '...' before '&' token
    9 | scanf("%d",&n);
      |            ^
main.c:11:2: error: expected identifier or '(' before 'for'
   11 |  for(i=0;i<n;i++){
      |  ^~~
main.c:11:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   11 |  for(i=0;i<n;i++){
      |           ^
main.c:11:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   11 |  for(i=0;i<n;i++){
      |               ^~
main.c:17:1: warning: data definition has no type or storage class
   17 | min = a[0];
      | ^~~
main.c:17:1: error: type defaults to 'int' in declaration of 'min' [-Wimplicit-int]
main.c:17:7: error: initializer element is not constant
   17 | min = a[0];
      |       ^
main.c:19:1: warning: data definition has no type or storage class
   19 | max = a[0];
      | ^~~
main.c:19:1: error: type defaults to 'int' in declaration of 'max' [-Wimplicit-int]
main.c:19:7: error: initializer element is not constant
   19 | max = a[0];
      |       ^
main.c:21:1: error: expected identifier or '(' before 'for'
   21 | for(i=0;i<n;i++){
      | ^~~
main.c:21:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   21 | for(i=0;i<n;i++){
      |          ^
main.c:21:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   21 | for(i=0;i<n;i++){
      |              ^~
main.c:27:1: error: expected identifier or '(' before 'for'
   27 | for(i=0;i<n;i++){
      | ^~~
main.c:27:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   27 | for(i=0;i<n;i++){
      |          ^
main.c:27:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   27 | for(i=0;i<n;i++){
      |              ^~
main.c:37:2: error: expected identifier or '(' before 'for'
   37 |  for(i=0;i<n;i++){
      |  ^~~
main.c:37:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   37 |  for(i=0;i<n;i++){
      |           ^
main.c:37:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   37 |  for(i=0;i<n;i++){
      |               ^~
main.c:47:8: error: expected declaration specifiers or '...' before string constant
   47 | printf("%d %d %f\n",min,max,sum);
      |        ^~~~~~~~~~~~
main.c:47:21: error: expected declaration specifiers or '...' before 'min'
   47 | printf("%d %d %f\n",min,max,sum);
      |                     ^~~
main.c:47:25: error: expected declaration specifiers or '...' before 'max'
   47 | printf("%d %d %f\n",min,max,sum);
      |                         ^~~
main.c:47:29: error: expected declaration specifiers or '...' before 'sum'
   47 | printf("%d %d %f\n",min,max,sum);
      |                             ^~~
main.c:49:1: error: expected identifier or '(' before 'return'
   49 | return 0;
      | ^~~~~~
main.c:51:1: error: expected identifier or '(' before '}' token
   51 | };
      | ^