#include <stdio.h>
#include <math.h>
int main(void)
{
printf("City Distance\n");
printf("=================\n");
double a1, a2, b1, b2, r;
printf("Enter latitude of origin: ");
scanf("%lf", &a1);
printf("Enter longitude of origin: ");
scanf("%lf", &b1);
printf("Enter latitude of destination: ");
scanf("%lf", &a2);
printf("Enter longitude of origin: ");
scanf("%lf, &b2");
r = abs(b1 - b2);
d = arccos(sin(a1)*sin(a2)+cos(a1)*cos(a2)*cos(r))*6371;
printf("Air distance is %f", d);
return 0;
}
哪里错了 求指点 十分感谢