摘要: 设计思路运用clock()函数来计算运行程序花了多少时间。运用宏定义来控制数组的长度。源程序代码#include #include #include using namespace std;#define N 10000void main(){ clock_t start, finish; int ... 阅读全文
posted @ 2015-03-29 17:40 BUANG 阅读(200) 评论(0) 推荐(0)
摘要: 设计思想用函数封装求数组最大值的代码,主函数中调用函数实现功能。源程序代码#include using namespace std;int Largest(int list[],int length){ int i; int max=list[0]; for (i=0;imax) { max=lis... 阅读全文
posted @ 2015-03-29 16:22 BUANG 阅读(748) 评论(0) 推荐(0)