上一页 1 ··· 35 36 37 38 39 40 41 42 43 ··· 56 下一页
摘要: Insertion Sort Write a program of the Insertion Sort algorithm which sorts a sequence A in ascending order. The algorithm should be based on the follo 阅读全文
posted @ 2019-04-13 17:28 青衫客36 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Maximum Profit You can obtain profits from foreign exchange margin transactions. For example, if you buy 1000 dollar at a rate of 100 yen per dollar, 阅读全文
posted @ 2019-04-13 16:57 青衫客36 阅读(342) 评论(0) 推荐(0) 编辑
摘要: 题目描述 定义了Circle圆形类,在此基础上派生出Cylinder圆柱体类。 Circle圆形类定义如下: class Circle { public: Circle(double r):radius(r){ } double area(){return PI*radius*radius;} // 阅读全文
posted @ 2019-04-10 12:59 青衫客36 阅读(336) 评论(0) 推荐(0) 编辑
摘要: 题目描述 小华历经12寒窗苦读,又经历4年大学磨砺,终于毕业了,随着毕业季的到来,找工作也日益紧张起来。由于要面试不同的公司,因此小华需要准备不同的简历。当然最基本的信息是必不可少的,基本信息:姓名、年龄、性别、专业。现有两家公司,小华想要投简历试一试。第一家langchao公司需要了解小华毕业学校 阅读全文
posted @ 2019-04-10 12:58 青衫客36 阅读(313) 评论(0) 推荐(0) 编辑
摘要: 题目描述 在一个平面打斗游戏中,任何的角色(Role)都有血量(blood)和位置loc(此处loc是Location类的实例)属性。有了Role类,可以派生出不同的角色,如人、神仙、怪兽等。如下程序中,定义了Location类和Role类,人类(Human)中新增了姓名和攻击力数据成员,请为Hum 阅读全文
posted @ 2019-04-10 12:57 青衫客36 阅读(358) 评论(0) 推荐(0) 编辑
摘要: # coding = utf - 8 # 直方图用于那些没有统计过的数据 from matplotlib import pyplot as plt a = [131,98,125,131,124,139,131,117,128,108,135,138,131,102, 97] # 计算组数 d = 3 # 组距 num_bins = (max(a) - min(a)) // d print(... 阅读全文
posted @ 2019-04-07 20:17 青衫客36 阅读(370) 评论(0) 推荐(0) 编辑
摘要: # coding = utf - 8 from matplotlib import pyplot as plt a = ["Scarlet ball rise", "spider-man", "Dunkirk", "War Wolf 2"] b_16 = [15746, 312,4497,319] b_15 = [12357,156,2045,168] b_14 = [2358,399,235... 阅读全文
posted @ 2019-04-07 20:14 青衫客36 阅读(300) 评论(0) 推荐(0) 编辑
摘要: # coding = utf - 8 from matplotlib import pyplot as plt y_3 = [11,17,16,11,12,11,12,6,6,7,8,9,12] y_10 = [26,26,28,19,21,17,16,19,18,20,19,17,23] x_3 = range(1, 14) x_10 = range(21, 34) # 设置图形大小 p... 阅读全文
posted @ 2019-04-07 20:09 青衫客36 阅读(230) 评论(0) 推荐(0) 编辑
摘要: 题目描述 引入了const关键词,用于指定“常”对象及“常”对象成员,提供了对数据的一种保护机制,这C++语言的特色之一。但由此,也引出了一些语法上的要求。这些语法要求,实际上有一套完善的原则,需要熟知。 下面的程序,要利用输入的两个数创建一个对象,并调用printxy成员函数输入两数之和。下面的程 阅读全文
posted @ 2019-04-03 12:47 青衫客36 阅读(303) 评论(0) 推荐(0) 编辑
摘要: 题目描述 定义一个矩形类,数据成员包括左下角和右上角坐标,定义的成员函数包括必要的构造函数、输入坐标的函数,实现矩形加法,以及计算并输出矩形面积的函数。要求使用提示中给出的测试函数并不得改动。 两个矩形相加的规则是:决定矩形的对应坐标分别相加,如 左下角(1,2),右上角(3,4)的矩形,与 左下角 阅读全文
posted @ 2019-04-03 12:46 青衫客36 阅读(584) 评论(0) 推荐(0) 编辑
上一页 1 ··· 35 36 37 38 39 40 41 42 43 ··· 56 下一页