2018年6月20日
摘要: 基础练习 (1)课本习题11 7 include using namespace std; int main() { ios_base::fmtflags original_flags = cout.flags(); //保存格式化参数设置 cout include using namespace 阅读全文
posted @ 2018-06-20 23:32 半醉未央 阅读(185) 评论(0) 推荐(0) 编辑
  2018年6月7日
摘要: 四、实验结论 1.实验内容1 Base.h A.h B.h C.h main.cpp include include include "A.h" include "B.h" include "C.h" using namespace std; int main() { int m,n; cin m 阅读全文
posted @ 2018-06-07 21:01 半醉未央 阅读(180) 评论(0) 推荐(0) 编辑
  2018年5月23日
摘要: 四、实验结论 1. 实验内容1 vector3.cpp 完整程序 dev c++下运行截图 实验内容2: (1)习题 6 17 include using namespace std; int main() { //重新定义一个整形变量a: int a; int p; p=9; //将 p=9改成 阅读全文
posted @ 2018-05-23 23:46 半醉未央 阅读(137) 评论(0) 推荐(0) 编辑
  2018年4月23日
摘要: 实验结论 1.实验内容2 (1)类graph的成员draw()中算法的简洁描述: 最外层for循环用来控制行数,for循环内第一个for循环用来输出符号前的空格(“总行数 当前行数”个空格),第二个for循环用来输出符号(“2 当前行数 1”个符号),一行输出完毕后,换至下一行,直至输出所有行。 ( 阅读全文
posted @ 2018-04-23 23:24 半醉未央 阅读(194) 评论(3) 推荐(0) 编辑
  2018年4月8日
摘要: 实验结论 4 11 定义并实现一个矩形类,有长,宽两个属性,由成员函数计算矩形的面积。 include using namespace std; class rectangle{ public: rectangle(float length, float wide); float area(); p 阅读全文
posted @ 2018-04-08 22:27 半醉未央 阅读(588) 评论(3) 推荐(0) 编辑
  2018年3月25日
摘要: 实验结论 2 28 实现一个简单的菜单程序,运行时显示"Menu:A(dd) D(elete) S(ort) Q(uit),Select one: "提示用户输入。输入A、D、S时分别提示"数据已经增加、删除、排序",输入Q时程序结束。 (1)使用if...else语句进行判断。 运行结果: (2) 阅读全文
posted @ 2018-03-25 23:29 半醉未央 阅读(215) 评论(7) 推荐(0) 编辑
  2018年3月16日
摘要: 实验结论 题目1:输入 1~7 的整数,如果输入的是 1~5,则输出“workday. Let’s work hard”;如果输入的是 6~7,则输出“weekend. Let’s have a rest.” 源代码(1)及运行结果 源代码(2)及运行结果 题目2:输入一个整数,将各位数字反转后输出 阅读全文
posted @ 2018-03-16 20:18 半醉未央 阅读(274) 评论(2) 推荐(0) 编辑