Language: C

#include <stdio.h>

#define LOWER_MAX 9999999

struct NUMBER {
	int upper;
	int lower;
	int minus; // 1 = minus, 0 = plus
};

void add( struct NUMER *sum, int new_val ){
	if( new_val > 0 ){
		if( ! sum->minus ) ){
			// Plus + Plus
			sum->lower = sum->lower + new_val;
			if( sum->lower > LOWER_MAX ) {
				sum->upper = sum->upper + 1;
				sum->lower = sum->lower - LOWER_MAX - 1;
			}
		} else {
			// Plus + Minus
			sum->lower = sum->lower - (-new_val);
			if( sum->lower  < 0 ){
				if( sum->upper > 0 ){
					sum->upper = sum->upper - 1;
					sum->lower = sum->lower + LOWER_MAX + 1;
				} else {
					sum->lower = sum->lower * (-1);
					sum->minus = 1;
				}
			}
		}
	} else if( new_val < 0 ) {
		if( sum->minus ) ){
			// Minus + Minus
			sum->lower = sum->lower + (-new_val);
			if( sum->lower > LOWER_MAX ) {
				sum->upper = sum->upper + 1;
				sum->lower = sum->lower - LOWER_MAX - 1;
			}
		} else {
			// Minus + Plus
			sum->lower = sum->lower - new_val;
			if( sum->lower  < 0 ){
				if( sum->upper > 0 ){
					sum->upper = sum->upper - 1;
					sum->lower = sum->lower + LOWER_MAX + 1;
				} else {
					sum->lower = sum->lower * (-1);
					sum->minus = 0;
				}
			}
		}
	}
}

int main(int argc, char **argv){
	int i;
	int len,val;
	int min,max;
	struct NUMBER sum;
	
	// Input Length
	scanf("%d",&len);
	
	// Input First Number
	scanf("%d",&val);
	min = val;
	max = val;
	sum.lower = 0;
	sum.upper = 0;
	sum.minus = 0;
	add(&sum,val);
	
	// Input Rest Number
	for(i=1;i<len;i++){
		scanf("%d",&val);
		if( val < min ){
			min = val;
		}
		if( val > max ){
			max = val;
		}
		add( &sum, val);
	}

	// Output
	printf("%d %d", min,max);
	if( sum.minus ){
		printf("-");
	}
	if( sum.upper > 0 ){
		printf("%d%07d\n",sum.upper,sum.lower);
	} else {
		printf("%d\n",sum.lower);
	}
	
	return 0;
}

Compiler output:
main.c:11:18: warning: 'struct NUMER' declared inside parameter list will not be visible outside of this definition or declaration
   11 | void add( struct NUMER *sum, int new_val ){
      |                  ^~~~~
main.c: In function 'add':
main.c:13:26: error: invalid use of undefined type 'struct NUMER'
   13 |                 if( ! sum->minus ) ){
      |                          ^~
main.c:13:36: error: expected statement before ')' token
   13 |                 if( ! sum->minus ) ){
      |                                    ^
main.c:15:28: error: invalid use of undefined type 'struct NUMER'
   15 |                         sum->lower = sum->lower + new_val;
      |                            ^~
main.c:15:41: error: invalid use of undefined type 'struct NUMER'
   15 |                         sum->lower = sum->lower + new_val;
      |                                         ^~
main.c:16:32: error: invalid use of undefined type 'struct NUMER'
   16 |                         if( sum->lower > LOWER_MAX ) {
      |                                ^~
main.c:17:36: error: invalid use of undefined type 'struct NUMER'
   17 |                                 sum->upper = sum->upper + 1;
      |                                    ^~
main.c:17:49: error: invalid use of undefined type 'struct NUMER'
   17 |                                 sum->upper = sum->upper + 1;
      |                                                 ^~
main.c:18:36: error: invalid use of undefined type 'struct NUMER'
   18 |                                 sum->lower = sum->lower - LOWER_MAX - 1;
      |                                    ^~
main.c:18:49: error: invalid use of undefined type 'struct NUMER'
   18 |                                 sum->lower = sum->lower - LOWER_MAX - 1;
      |                                                 ^~
main.c:20:19: error: expected '}' before 'else'
   20 |                 } else {
      |                   ^~~~
main.c:22:28: error: invalid use of undefined type 'struct NUMER'
   22 |                         sum->lower = sum->lower - (-new_val);
      |                            ^~
main.c:22:41: error: invalid use of undefined type 'struct NUMER'
   22 |                         sum->lower = sum->lower - (-new_val);
      |                                         ^~
main.c:23:32: error: invalid use of undefined type 'struct NUMER'
   23 |                         if( sum->lower  < 0 ){
      |                                ^~
main.c:24:40: error: invalid use of undefined type 'struct NUMER'
   24 |                                 if( sum->upper > 0 ){
      |                                        ^~
main.c:25:44: error: invalid use of undefined type 'struct NUMER'
   25 |                                         sum->upper = sum->upper - 1;
      |                                            ^~
main.c:25:57: error: invalid use of undefined type 'struct NUMER'
   25 |                                         sum->upper = sum->upper - 1;
      |                                                         ^~
main.c:26:44: error: invalid use of undefined type 'struct NUMER'
   26 |                                         sum->lower = sum->lower + LOWER_MAX + 1;
      |                                            ^~
main.c:26:57: error: invalid use of undefined type 'struct NUMER'
   26 |                                         sum->lower = sum->lower + LOWER_MAX + 1;
      |                                                         ^~
main.c:28:44: error: invalid use of undefined type 'struct NUMER'
   28 |                                         sum->lower = sum->lower * (-1);
      |                                            ^~
main.c:28:57: error: invalid use of undefined type 'struct NUMER'
   28 |                                         sum->lower = sum->lower * (-1);
      |                                                         ^~
main.c:29:44: error: invalid use of undefined type 'struct NUMER'
   29 |                                         sum->minus = 1;
      |                                            ^~
main.c: At top level:
main.c:33:11: error: expected identifier or '(' before 'else'
   33 |         } else if( new_val < 0 ) {
      |           ^~~~
main.c:55:1: error: expected identifier or '(' before '}' token
   55 | }
      | ^
main.c: In function 'main':
main.c:73:13: error: passing argument 1 of 'add' from incompatible pointer type [-Wincompatible-pointer-types]
   73 |         add(&sum,val);
      |             ^~~~
      |             |
      |             struct NUMBER *
main.c:11:25: note: expected 'struct NUMER *' but argument is of type 'struct NUMBER *'
   11 | void add( struct NUMER *sum, int new_val ){
      |           ~~~~~~~~~~~~~~^~~
main.c:84:22: error: passing argument 1 of 'add' from incompatible pointer type [-Wincompatible-pointer-types]
   84 |                 add( &sum, val);
      |                      ^~~~
      |                      |
      |                      struct NUMBER *
main.c:11:25: note: expected 'struct NUMER *' but argument is of type 'struct NUMBER *'
   11 | void add( struct NUMER *sum, int new_val ){
      |           ~~~~~~~~~~~~~~^~~