数据结构
文章平均质量分 66
caonian_
这个作者很懒,什么都没留下…
展开
-
数据结构_分别使用for循环和递归打印1-N的所有整数,比较运行时间
#include "stdio.h" void main() { printf("Please input a number:"); int N; scanf("%d",&N); printN(N); } // for void printN( N ) { int i; for(i=1;i原创 2016-04-23 22:00:26 · 468 阅读 · 0 评论 -
数据结构_写程序计算给定多项式在给定点处的值
#include "stdio.h" #include "time.h" #include "math.h" //clock()捕捉从程序开始运行到clock()被调用时所耗费的时间,clock_t为其数据类型(单位) clock_t start,stop; double duration; //多项式最大系数 #define MAXN 10 //函数最大调用次数 #defi原创 2016-04-23 22:34:54 · 2156 阅读 · 0 评论