> 其他 >
C++定义描述复数的结构体类型变量,实现复数的输入输出.设计三个函数实现复数的加法,减法和乘法运算
人气:404 ℃ 时间:2020-04-13 07:51:22
解答
给你个类的吧,c++中一般不用结构体#include //using namespace std;class complex{private:\x05float real;\x05float image;public:\x05complex(float r=0,float i=0)\x05{\x05 real=r;\x05 image=i;\x05}/*\x05void...
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版