标签:
使用反函数做
#include<stdio.h>
#include<math.h>
#define PI 3.1415926
int main()
{
double n,x1,y1,x2,y2,a,b,s;
scanf("%lf",&n);
while(n--)
{
scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
a=(2*x1*x2+2*y1*y2)/(2*sqrt(x1*x1+y1*y1)*sqrt(x2*x2+y2*y2));
b=180/PI;
s=acos(a)*b;
printf("%.2lf\n",s);
}
return 0;
}
标签:
原文地址:http://www.cnblogs.com/aisuiyuan/p/4476132.html