摘要: #include<stdio.h> #define N 5 typedef struct student{ long no; char name[20]; int score; }STU; void input(STU s[], int n); int findMinlist(STU s[], ST 阅读全文
posted @ 2021-12-26 21:29 李岩岩岩岩 阅读(15) 评论(2) 推荐(0) 编辑
摘要: #include <stdio.h> #define N 5 int binarySearch(int *x, int n, int item); // 函数声明 int main() { int a[N] = {2, 7, 19, 45, 66}; int i, index, key; print 阅读全文
posted @ 2021-12-22 17:53 李岩岩岩岩 阅读(16) 评论(2) 推荐(0) 编辑
摘要: #include <stdio.h> #define N 5 void output(int x[], int n); int main() { int x[N] = {9, 55, 30, 27, 22}; int i; int k; // 用于记录最大元素的下标 int t; // 用作交换两个 阅读全文
posted @ 2021-12-14 16:54 李岩岩岩岩 阅读(14) 评论(2) 推荐(0) 编辑
摘要: #include <stdio.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 < j; i++) 阅读全文
posted @ 2021-12-04 13:18 李岩岩岩岩 阅读(9) 评论(2) 推荐(0) 编辑
摘要: #include<stdio.h> #include<math.h> double jiecheng(int x){ if(x==1) return 1; else return x*jiecheng(x-1); } double fun(int n){ double t=0; int i; for 阅读全文
posted @ 2021-11-27 18:58 李岩岩岩岩 阅读(13) 评论(2) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdlib.h> #include <time.h> const int N = 5; int main() { int x,n; srand(time(0)); for(n=1;n<=N;n++) { x=rand() %100; pri 阅读全文
posted @ 2021-11-14 13:13 李岩岩岩岩 阅读(27) 评论(2) 推荐(0) 编辑
摘要: #include <stdio.h> int main() { char c1,c2; int a1, a2; scanf("%d%c%d%c",&a1,&c1,&a2,&c2); printf("a1=%d, a2=%d\n",a1,a2); printf("c1=%c,c2=%c\n",c1,c 阅读全文
posted @ 2021-10-29 23:41 李岩岩岩岩 阅读(49) 评论(0) 推荐(0) 编辑