Language: C

#include <stdio.h>
a[110],b[110];main(i,n){
	for(;scanf("%d",&n),n;){
		if(n>90)exit(1);
		for(i=0;i<=n;i++){
			scanf("%d",a+i);
			if(a[i]<1||100000000<a[i])exit(1);
		}
		for(i=1;i<=n;i++)b[i]=a[i]-a[i-1];
		if(b[1]==b[2]&&b[2]==b[3]){
			for(i=4;i<=n;i++)if(b[i]!=b[1])break;
			if(i>n)exit(1);
			printf("%d\n",a[i]);
		}
		else if(b[1]==b[2])printf("%d\n",a[3]);
		else if(b[2]==b[3])printf("%d\n",a[0]);
		else if(b[1]==a[3]-a[1])printf("%d\n",a[2]),fprintf(stderr,"4 %d %d %d %d\n",a[0],a[1],a[2],a[3],a[4]);;
		else if(b[3]==a[2]-a[0])printf("%d\n",a[1]),fprintf(stderr,"4 %d %d %d %d\n",a[0],a[1],a[2],a[3],a[4]);
		else exit(1);
	}
exit(0);}

Compiler output:
main.c:2:1: warning: data definition has no type or storage class
    2 | a[110],b[110];main(i,n){
      | ^
main.c:2:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:2:8: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
    2 | a[110],b[110];main(i,n){
      |        ^
main.c:2:15: error: return type defaults to 'int' [-Wimplicit-int]
    2 | a[110],b[110];main(i,n){
      |               ^~~~
main.c: In function 'main':
main.c:2:15: error: type of 'i' defaults to 'int' [-Wimplicit-int]
main.c:2:15: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:4:25: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
    4 |                 if(n>90)exit(1);
      |                         ^~~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
    1 | #include <stdio.h>
  +++ |+#include <stdlib.h>
    2 | a[110],b[110];main(i,n){
main.c:4:25: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
    4 |                 if(n>90)exit(1);
      |                         ^~~~
main.c:4:25: note: include '<stdlib.h>' or provide a declaration of 'exit'
main.c:7:51: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
    7 |                         if(a[i]<1||100000000<a[i])exit(1);
      |                                                   ^~~~
main.c:7:51: note: include '<stdlib.h>' or provide a declaration of 'exit'
main.c:12:32: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
   12 |                         if(i>n)exit(1);
      |                                ^~~~
main.c:12:32: note: include '<stdlib.h>' or provide a declaration of 'exit'
main.c:18:17: error: 'else' without a previous 'if'
   18 |                 else if(b[3]==a[2]-a[0])printf("%d\n",a[1]),fprintf(stderr,"4 %d %d %d %d\n",a[0],a[1],a[2],a[3],a[4]);
      |                 ^~~~
main.c:19:22: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
   19 |                 else exit(1);
      |                      ^~~~
main.c:19:22: note: include '<stdlib.h>' or provide a declaration of 'exit'
main.c:21:1: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
   21 | exit(0);}
      | ^~~~
main.c:21:1: note: include '<stdlib.h>' or provide a declaration of 'exit'