1051 复数乘法
#include <iostream>
#include <cmath>
using namespace std;
const double EPS = 0.005;
int main()
{
double R1, P1, R2, P2;
cin >> R1 >> P1 >> R2 >> P2;
double R3 = R1 * R2, P3 = P1 + P2;
double b = R3 * sin(P3), a = R3 * cos(P3);
//printf("%.2f\n", -0.004); //输出 -0.00, 应该输出0.00
if (fabs(a) < EPS)
a = 0;
if (fabs(b) < EPS)
b = 0;
printf("%.2f", a);
if (b >= 0)
printf("+%.2fi", b);
else
printf("%.2fi", b);
}