摘要:
Part2 #include <stdio.h> #include <stdlib.h> #include <string.h> const int N = 10; // 定义结构体类型struct student,并定义其别名为STU typedef struct student { long i 阅读全文
posted @ 2019-12-25 11:14
徐劲节
阅读(130)
评论(3)
推荐(0)
摘要:
Part1: #include <stdio.h> #include <stdlib.h> const int N=5; // 定义结构体类型struct student,并定义STU为其别名 typedef struct student { long no; char name[20]; int 阅读全文
posted @ 2019-12-19 22:57
徐劲节
阅读(119)
评论(1)
推荐(0)
摘要:
Part2 // 练习:使用二分查找,在一组有序元素中查找数据项 // 形参是数组,实参是数组名 #include <stdio.h> #include <stdlib.h> const int N=5; int binarySearch(int x[], int n, int item); // 阅读全文
posted @ 2019-12-15 21:58
徐劲节
阅读(124)
评论(2)
推荐(0)
摘要:
Part2: //寻找两个整数之间的所有素数(包括这两个整数),把结果保存在数组bb中,函数返回素数的个数。 // 例如,输入6和21,则输出为:7 11 13 17 19。 #include <stdio.h> #include <stdlib.h> #define N 1000 int fun( 阅读全文
posted @ 2019-12-01 21:52
徐劲节
阅读(186)
评论(2)
推荐(0)
浙公网安备 33010602011771号