#include<stdio.h>
#include<math.h>

int main(void){
double a,b,c,d,e,f,g,h,i,j,k,l,m,n;
double x=600;

printf("X=");<br>scanf("%lf", &a);
printf("Y=");<br>scanf("%lf", &b);
printf("Z=");<br>scanf("%lf", &c);
d=pow(a,2)+pow(b,2);
e=pow(a,2)+pow(b,2)+pow(c,2);
f=sqrt(d);
g=sqrt(e);
h=acos(f/g);
i=acos(x/g);
j=h+i;
k=asin(x/g);

if(g<=600 && a>0 && b>0 && c>0){
l=180*atan(b/a)/3.1416;
m=180*j/3.1416;
n=360*k/3.1416;
printf("(%lf, %lf, %lf)\n", l, m, n);

}else{
printf("It's not right coordinate.");}
return 0;}


minGW로 실행중임

l이랑 m은 출력되는데 n이 0아니면 179.99같은거만 나옴