摘要: 1. #include <stdio.h> #include <stdlib.h> #include <string.h> const int N = 10; // 定义结构体类型struct student,并定义其别名为STU typedef struct student { long int 阅读全文
posted @ 2019-12-29 11:55 吴迪奇 阅读(115) 评论(2) 推荐(0)
摘要: 1. #include <stdio.h> #include <stdlib.h> const int N=5; // 定义结构体类型struct student,并定义STU为其别名 typedef struct student { long no; char name[20]; int scor 阅读全文
posted @ 2019-12-22 12:04 吴迪奇 阅读(149) 评论(2) 推荐(0)
摘要: part2 2-1-1 // 练习:使用二分查找,在一组有序元素中查找数据项 // 形参是数组,实参是数组名 #include <stdio.h> #include <stdlib.h> const int N=5; int binarySearch(int x[], int n, int item 阅读全文
posted @ 2019-12-17 22:11 吴迪奇 阅读(119) 评论(3) 推荐(0)
摘要: blank1 #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; for(i=2;i< 阅读全文
posted @ 2019-12-01 15:06 吴迪奇 阅读(158) 评论(0) 推荐(0)
摘要: blank1 #include <stdio.h> #include <stdlib.h> int main() { int number, max, min, n; n=1; printf("输入第%d个数: ", n); scanf_s("%d", &number); max = number; 阅读全文
posted @ 2019-11-18 12:34 吴迪奇 阅读(116) 评论(0) 推荐(0)
摘要: part1 ex2-1 #include <stdio.h> int main() { int x=1234; float f=123.456; double m=123.456; char ch='a'; char a[]="Hello, world!"; int y=3, z=4; printf 阅读全文
posted @ 2019-11-05 23:39 吴迪奇 阅读(154) 评论(2) 推荐(0)
摘要: 判断奇偶:ex1.c 根据不同的输入,显示不同提示信息:ex2.c 根据用户输入字符,判断如果是小写字符,则转换成大写;否则保持原样:ex3.c 总结:作为一个新人,还有好多不明白的地方,必须得向别人请教。 阅读全文
posted @ 2019-10-18 22:50 吴迪奇 阅读(165) 评论(1) 推荐(0)