1051
作者:
峡迩 | 来源:发表于
2017-09-04 12:29 被阅读0次// 部分正确???
//
#include "stdafx.h"
#include<iostream>
#include<iomanip>
#include<cmath> //sin and cos!
using namespace std;
int main()
{
double r1, p1, r2, p2;
cin >> r1 >> p1 >> r2 >> p2;
double r = r1*r2;
double p = p1 + p2;
double a = r*cos(p);
double b = r*sin(p);
cout.setf(ios::fixed);
if (b < 0)
cout<<setprecision(2) << a << "-" << (-b) << "i";
else
cout <<setprecision(2)<< a << "+" << b << "i";
system("pause");
return 0;
}
本文标题:1051
本文链接:https://www.haomeiwen.com/subject/wbfejxtx.html
网友评论