2018年5月25日

数据结构-9阶多项式

摘要: #include<stdio.h>#include<time.h>#include<math.h>clock_t start, stop;double duration;#define MAXN 10 //多项式最大项数,即多项式阶数+1 double f1(int n, double a[], d 阅读全文

posted @ 2018-05-25 18:29 Mint-Tremor 阅读(276) 评论(0) 推荐(0) 编辑

数据结构-多项式

摘要: #include<stdio.h>#include<time.h> clock_t start, stop; //clock_t是clock()函数返回的变量类型double duration; //记录被测函数运行时间,以秒为单位 int main2(){ //不在测试范围内的准备工作写在cloc 阅读全文

posted @ 2018-05-25 18:26 Mint-Tremor 阅读(143) 评论(0) 推荐(0) 编辑

数据结构-递归输出数字

摘要: #include<stdio.h> void PrintN(int N){ if (N) { PrintN(N-1); printf("%d\n", N); } return;} int main(){ int N; scanf("%d", &N); PrintN(N); return 0; } 阅读全文

posted @ 2018-05-25 18:24 Mint-Tremor 阅读(189) 评论(0) 推荐(0) 编辑

数据结构-顺序输出数字

摘要: #include<stdio.h> void PrintN(int N){ int i; for (i = 1; i <= N; i++) { printf("%d\n", i); } return;} int main(){ int N; scanf("%d", &N); PrintN(N); r 阅读全文

posted @ 2018-05-25 18:23 Mint-Tremor 阅读(163) 评论(0) 推荐(0) 编辑

字母小游戏2

摘要: #include<stdio.h>#include<string.h> int main(){ int n, m, i; char a[200]; scanf("%d", &n); getchar(); while (n--) { m = 0; //注意m变量应该在每次循环开始、统计小写字母之前先设 阅读全文

posted @ 2018-05-25 17:00 Mint-Tremor 阅读(113) 评论(0) 推荐(0) 编辑

字母小游戏1

摘要: #include<stdio.h>#include<stdlib.h> int main(){ int n; scanf("%d",&n); getchar(); int a; int i, j; char m[200]; while (n--) { a = 0; gets(m); j = strl 阅读全文

posted @ 2018-05-25 16:49 Mint-Tremor 阅读(101) 评论(0) 推荐(0) 编辑

三个数从小到大排列

摘要: #include<stdio.h> int main() { int a, b, c; scanf("%d %d %d", &a, &b, &c); int n; if (a > b) { n = a; a = b; b = n; } if (b > c) { n = c; c = b; b = n 阅读全文

posted @ 2018-05-25 13:29 Mint-Tremor 阅读(208) 评论(0) 推荐(0) 编辑

括号配对问题2

摘要: #include<stdio.h> #include<string.h> #include<stdlib.h> // 写一个判断的括号是否匹配的函数 int MatchCheck(char a[],int len){ int flag = 0; char s[10000]; int top,i; c 阅读全文

posted @ 2018-05-25 11:25 Mint-Tremor 阅读(122) 评论(0) 推荐(0) 编辑

括号配对问题1

摘要: #include<stdio.h> #include<stdlib.h> #define Stack_size 10000 typedef struct{ char elem[Stack_size]; int top; } SeqStack; void InitStack (SeqStack *S) 阅读全文

posted @ 2018-05-25 11:24 Mint-Tremor 阅读(250) 评论(0) 推荐(0) 编辑

A+B Problem

摘要: #include<stdio.h> int main(){ int a, b; scanf("%d%d", &a, &b); printf("%d", a + b); getchar(); } 第一次 阅读全文

posted @ 2018-05-25 10:15 Mint-Tremor 阅读(108) 评论(0) 推荐(0) 编辑

导航