复数 题解:
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
double a, b, c, d;
char ch;
cin >> a >> b >> c >> d >> ch;
if (ch == '+') {
printf("%.1lf %.1lf", a + c, b + d);
}
else {
printf("%.1lf %.1lf", a * c - b * d, a * d + b * c);
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发