摘要: 实验一: 源码: #include <stdio.h> #define N 5 // 定义结构体类型struct student,并定义STU为其别名 typedef struct student { long no; char name[20]; int score; } STU; // 函数声明 阅读全文
posted @ 2021-12-28 22:35 gl11639 阅读(57) 评论(0) 推荐(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; prin 阅读全文
posted @ 2021-12-22 01:37 gl11639 阅读(43) 评论(0) 推荐(0)
摘要: 实验一: task1_1源码: #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; // 用于记录最大元素的下标 阅读全文
posted @ 2021-12-14 23:59 gl11639 阅读(57) 评论(0) 推荐(0)
摘要: 实验一: task1_1源码: #include <stdio.h> const int N = 4; int main() { int a[N] = {2, 0, 2, 1}; // 定义一个int型数组a,包含N个元素 char b[N] = {'2', '0', '1', '1'}; // 定 阅读全文
posted @ 2021-12-08 09:37 gl11639 阅读(15) 评论(0) 推荐(0)
摘要: 实验一: task1_1源码: #include <stdio.h> long long fac(int n); int main() { int i, n; printf("Enter n: "); scanf("%d", &n); for (i = 1; i <= n; ++i) printf( 阅读全文
posted @ 2021-12-01 08:54 gl11639 阅读(70) 评论(1) 推荐(0)
摘要: 实验一: 源码: #include <stdio.h> int main() { int num; scanf("%d", &num); printf("2049%04d\n", num); scanf("%d", &num); printf("2049%04d\n", num); scanf("% 阅读全文
posted @ 2021-11-17 09:43 gl11639 阅读(144) 评论(2) 推荐(0)
摘要: ~实验一 源码: #include<stdio.h> int main(void) { printf(" O \n" "<H>\n" "I I\n" " O \n" "<H>\n" "I I\n"); return 0; } 结果: 源码: #include<stdio.h> int main(vo 阅读全文
posted @ 2021-10-30 21:11 gl11639 阅读(60) 评论(0) 推荐(0)