Language: C

a, b, x;
double s, t, ans1, ans2;

main () {
	scanf("%d %d %d", &a, &b, &x);
	s = ((double)x) / a;
	
	// shita sankaku
	t = s * 2 / b;
	if(t<=a){
	  printf("%lf\n", 90-atan2(t, b)*360/2/M_PI);
	  return 0;
	}
	
	// ue sankaku
	t = (a*b - s) * 2 / a;
	printf("%.7lf\n",atan2(t, a)*360/2/M_PI);
}


Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a, b, x;
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:4: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
    1 | a, b, x;
      |    ^
main.c:1:7: error: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
    1 | a, b, x;
      |       ^
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main () {
      | ^~~~
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    5 |         scanf("%d %d %d", &a, &b, &x);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | a, b, x;
main.c:5:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    5 |         scanf("%d %d %d", &a, &b, &x);
      |         ^~~~~
main.c:5:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:11:11: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   11 |           printf("%lf\n", 90-atan2(t, b)*360/2/M_PI);
      |           ^~~~~~
main.c:11:11: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:11:11: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:11:11: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:11:30: error: implicit declaration of function 'atan2' [-Wimplicit-function-declaration]
   11 |           printf("%lf\n", 90-atan2(t, b)*360/2/M_PI);
      |                              ^~~~~
main.c:1:1: note: include '<math.h>' or provide a declaration of 'atan2'
  +++ |+#include <math.h>
    1 | a, b, x;
main.c:11:30: warning: incompatible implicit declaration of built-in function 'atan2' [-Wbuiltin-declaration-mismatch]
   11 |           printf("%lf\n", 90-atan2(t, b)*360/2/M_PI);
      |                              ^~~~~
main.c:11:30: note: include '<math.h>' or provide a declaration of 'atan2'
main.c:11:48: error: 'M_PI' undeclared (first use in this function)
   11 |           printf("%lf\n", 90-atan2(t, b)*360/2/M_PI);
      |                                                ^~~~
main.c:11:48: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   17 |         printf("%.7lf\n",atan2(t, a)*360/2/M_PI);
      |         ^~~~~~
main.c:17:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:17:26: warning: incompatible implicit declaration of built-in function 'atan2' [-Wbuiltin-declaration-mismatch]
   17 |         printf("%.7lf\n",atan2(t, a)*360/2/M_PI);
      |                          ^~~~~
main.c:17:26: note: include '<math.h>' or provide a declaration of 'atan2'