摘要: 一、设计思路 第三版程序在第二版上增加了用户填写答案和自动批改答案功能,并且还能显示一共答对了多少题。 二、程序源代码#include #include #include #include using namespace std;void Display1(int,int,int,int,in... 阅读全文
posted @ 2015-03-22 17:41 花总总 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 题目:返回一个整数数组中最大子数组要求:输入一个整形数组,数组里有整数也有负数;数组中连续的一个或多个整数组成一个整数组每个子数组都有一个和;求所有子数组的和的最大值,要求时间复杂度为O(n)。思路:设数组为a[10],从第一个数啊a[1]开始,设置两个变量,一个记录和,一个记录最大值,如果和大于最... 阅读全文
posted @ 2015-03-18 10:56 花总总 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 一、测试方法6个值得测试的具体部位:Right-结果是否正确?B-是否所有的边界条件都是正确的?I-能查一下反向关联吗?C-能用其他手段交叉检查一下结果吗?E-你是否可以强制错误条件发生?P-是否满足性能要求?二、测试部分case 3: if(c[5] == 1) ... 阅读全文
posted @ 2015-03-16 18:42 花总总 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 程序代码;#include #include #include #include using namespace std;void Display1(int,int,int);void Display2(int [],int,int,int);int main(){ int a = 0; ... 阅读全文
posted @ 2015-03-15 22:14 花总总 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 源代码:#include #include #include #include int main(){ int a = 0; int b = 0; int mode = 0;//0:加 1:减 2:乘 3:除 int i = 0; int c[5]={0,30... 阅读全文
posted @ 2015-03-12 23:04 花总总 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 程序开始提示用户输入,用户输入自己的要求,存储到定义的数据中,然后根据用户要求,选择是否有乘除,括号,数据范围等等,四则运算用函数实现进行调用,对用户的要求进行判断,按照要求输出结果 阅读全文
posted @ 2015-03-10 12:41 花总总 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 设计思想:出三十道一百以内数的随机四则运算题目,先随机两个一百以内的数字,再通过随机数确定四则运算算符,最后通过for循环输出三十道源代码程序:#include #include #include #include int main(){ int a = 0; int b = 0; ... 阅读全文
posted @ 2015-03-08 11:00 花总总 阅读(729) 评论(0) 推荐(1) 编辑
摘要: 最近准备读软件工程课本和《梦断代码》。第0章 软件时间第1章 死定了[2003年7月]第2章 Agenda之魂[1968~2001年]第3章 原型与Python[2001~2002年11月]第4章 乐高王国[2002年11月~2003年8月]第5章 管束奇客和狗[2003年4月~8月]第6章 完成... 阅读全文
posted @ 2015-03-05 09:31 花总总 阅读(128) 评论(0) 推荐(0) 编辑