摘要: ex.2 #include <stdio.h> #include <stdlib.h> #include <string.h> const int N = 10; // 定义结构体类型struct student,并定义其别名为STU typedef struct student { long in 阅读全文
posted @ 2019-12-31 15:59 千寻虚无 阅读(71) 评论(1) 推荐(0)
摘要: ex.1补足程序 #include <stdio.h> #include <stdlib.h> const int N=5; // 定义结构体类型struct student,并定义STU为其别名 typedef struct student { long no; char name[20]; in 阅读全文
posted @ 2019-12-23 22:50 千寻虚无 阅读(87) 评论(2) 推荐(0)
摘要: ex2.1.1 // 练习:使用二分查找,在一组有序元素中查找数据项 // 形参是数组,实参是数组名 #include <stdio.h> #include <stdlib.h> const int N=5; int binarySearch(int x[], int n, int item); / 阅读全文
posted @ 2019-12-16 23:45 千寻虚无 阅读(103) 评论(4) 推荐(0)
摘要: ex.1寻找两个整数之间的所有素数 #include <stdio.h> #include <stdlib.h> #define N 1000 int fun(int n,int m,int bb[N]) { int i,j,k=0,flag; for(j=n;j<=m;j++) { flag=1; 阅读全文
posted @ 2019-12-01 23:07 千寻虚无 阅读(120) 评论(1) 推荐(0)
摘要: ex.1 解一元二次方程 #include <math.h> #include <stdio.h> #include <stdlib.h> int main() { float a, b, c, x1, x2; float delta, real, imag; printf("Enter a, b, 阅读全文
posted @ 2019-11-18 23:22 千寻虚无 阅读(94) 评论(3) 推荐(0)
摘要: 控制小数点后面位数错误 字符数错误 line6缺少& line10 11输入double类型的数据时,格式控制符没有使用 %lf 判断整数正序与逆序是否相同 输入年份和月份,求该月天数 判断学生成绩等级 阅读全文
posted @ 2019-11-04 20:45 千寻虚无 阅读(116) 评论(2) 推荐(0)
摘要: test1.判断奇偶 运行结果如下: test2.判断工作日 运行结果如下: test3.小写字母转大写字母 运行结果如下: test4.十进制转二进制 运行结果如下: 阅读全文
posted @ 2019-10-17 23:14 千寻虚无 阅读(114) 评论(0) 推荐(0)
摘要: 运行结果如下: 阅读全文
posted @ 2019-10-17 23:04 千寻虚无 阅读(159) 评论(0) 推荐(0)
摘要: 运行结果如下: 阅读全文
posted @ 2019-10-17 23:02 千寻虚无 阅读(276) 评论(0) 推荐(0)
摘要: 运行结果如下: 阅读全文
posted @ 2019-10-17 23:00 千寻虚无 阅读(441) 评论(0) 推荐(0)