#include <stdio.h>
#include <math.h>
int main()
{
double a,b,c,d,b1,d1,b2,d2;
scanf("%lf %lf %lf %lf",&a,&b,&c,&d);
b1 = cos(b);
b2 = sin(b);
d1 = cos(d);
d2 = sin(d);
b = a*b1*c*d2 + a*b2*c*d1;
a = a*c*b1*d1 - a*b2*c*d2;
if(fabs(a)<0.01) a = 0.00; //-0.004到0的时候为0,不要带上负号
if(fabs(b)<0.01) b = 0.00;
if(b>=0)
printf("%.2lf+%.2lfi",a,b);
if(b<0)
printf("%.2lf%.2lfi",a,b);
return 0;
}
03-23
1958
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交