摘要: ex2 #include <stdio.h> #include <stdlib.h> #include <string.h> const int N = 10; typedef struct student { long int id; char name[20]; float objective; 阅读全文
posted @ 2019-12-31 16:26 三足巫鸦 阅读(110) 评论(2) 推荐(0)
摘要: ex1-2 #include <stdio.h> #include <stdlib.h> const int N=5; typedef struct student { long no; char name[20]; int score; }STU; void input(STU s[], int 阅读全文
posted @ 2019-12-23 22:39 三足巫鸦 阅读(78) 评论(1) 推荐(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-17 09:42 三足巫鸦 阅读(88) 评论(3) 推荐(0)
摘要: canvas拓展 将“printCircle(5, 10); // 调用函数,在坐标(5,10)打印圆圈 Sleep(5000); // 延时5000ms,即5s system("cls"); // 清除屏幕 printCircle(10, 5); // 调用函数,在坐标(10,5)打印圆圈”替换为 阅读全文
posted @ 2019-12-01 22:47 三足巫鸦 阅读(108) 评论(0) 推荐(0)
摘要: #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, c: "); while 阅读全文
posted @ 2019-11-19 07:39 三足巫鸦 阅读(97) 评论(2) 推荐(0)
摘要: ex2-1 ex2-2 ex2-3 ex2-4 将字符修改为常数 ex3-1 ex2 ex3 阅读全文
posted @ 2019-11-04 12:48 三足巫鸦 阅读(125) 评论(4) 推荐(0)
摘要: ex1 ex2 ex3 阅读全文
posted @ 2019-10-18 12:34 三足巫鸦 阅读(122) 评论(0) 推荐(0)
摘要: // 程序功能: // 要求用户从键盘输入一个整数,判断其是奇数还是偶数 #include int main() { int x; printf("输入一个整数: \n"); scanf("%d",&x); // 在×××处填写相应表达式 // 使得当表达式成立时,判定x是奇数,否则是偶... 阅读全文
posted @ 2019-10-18 12:24 三足巫鸦 阅读(166) 评论(0) 推荐(0)