Language: C

float a,b,c,d;
float A,B,C,D,E,F;
main(){
	for(;scanf("%f%f%f%f",&a,&b,&c,&d),a+1;){
		a*=M_PI/180;
		b*=M_PI/180;
		c*=M_PI/180;
		d*=M_PI/180;
		A=cos(a)*cos(b);
		B=cos(a)*sin(b);
		C=sin(a);
		D=cos(c)*cos(d);
		E=cos(c)*sin(d);
		F=sin(c);
		printf("%.0f\n",6378.1*acos(A*D+B*E+C*F));
	}
	exit(0);
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:4:14: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |         for(;scanf("%f%f%f%f",&a,&b,&c,&d),a+1;){
      |              ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | float a,b,c,d;
main.c:4:14: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |         for(;scanf("%f%f%f%f",&a,&b,&c,&d),a+1;){
      |              ^~~~~
main.c:4:14: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:20: error: 'M_PI' undeclared (first use in this function)
    5 |                 a*=M_PI/180;
      |                    ^~~~
main.c:5:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:19: error: implicit declaration of function 'cos' [-Wimplicit-function-declaration]
    9 |                 A=cos(a)*cos(b);
      |                   ^~~
main.c:1:1: note: include '<math.h>' or provide a declaration of 'cos'
  +++ |+#include <math.h>
    1 | float a,b,c,d;
main.c:9:19: warning: incompatible implicit declaration of built-in function 'cos' [-Wbuiltin-declaration-mismatch]
    9 |                 A=cos(a)*cos(b);
      |                   ^~~
main.c:9:19: note: include '<math.h>' or provide a declaration of 'cos'
main.c:10:26: error: implicit declaration of function 'sin' [-Wimplicit-function-declaration]
   10 |                 B=cos(a)*sin(b);
      |                          ^~~
main.c:10:26: note: include '<math.h>' or provide a declaration of 'sin'
main.c:10:26: warning: incompatible implicit declaration of built-in function 'sin' [-Wbuiltin-declaration-mismatch]
main.c:10:26: note: include '<math.h>' or provide a declaration of 'sin'
main.c:15:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   15 |                 printf("%.0f\n",6378.1*acos(A*D+B*E+C*F));
      |                 ^~~~~~
main.c:15:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:15:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:15:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:15:40: error: implicit declaration of function 'acos' [-Wimplicit-function-declaration]
   15 |                 printf("%.0f\n",6378.1*acos(A*D+B*E+C*F));
      |                                        ^~~~
main.c:15:40: note: include '<math.h>' or provide a declaration of 'acos'
main.c:15:40: warning: incompatible implicit declaration of built-in function 'acos' [-Wbuiltin-declaration-mismatch]
main.c:15:40: note: include '<math.h>' or provide a declaration of 'acos'
main.c:17:9: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
   17 |         exit(0);
      |         ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
  +++ |+#include <stdlib.h>
    1 | float a,b,c,d;
main.c:17:9: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
   17 |         exit(0);
      |         ^~~~
main.c:17:9: note: include '<stdlib.h>' or provide a declaration of 'exit'