03 2019 档案

摘要:源代码: #include<iostream> #include<cmath> using namespace std; class complex{ public: complex(double a=0, double b=0); //构造函数 complex(complex &c); //复制构 阅读全文
posted @ 2019-03-31 13:09 Joey_Yan 阅读(109) 评论(1) 推荐(0)
摘要:1.编写重载函数add(),实现对int型,double型,Complex型数据的加法。在main()函数中定义不同类型 数据,调用测试。 代码如下: #include<iostream> using namespace std; struct Complex{ double real; doubl 阅读全文
posted @ 2019-03-24 14:18 Joey_Yan 阅读(224) 评论(4) 推荐(0)
摘要:2-28 (1)用if else 语句 #include<iostream> using namespace std; int main(){ char alphabet; while (true) { cout << "Menu : A(dd) D(elete) S(ort) Q(uit) , S 阅读全文
posted @ 2019-03-16 19:43 Joey_Yan 阅读(134) 评论(2) 推荐(0)