摘要: TEST1 #include <stdio.h> #define N 5 // 定义结构体类型struct student,并定义STU为其别名 typedef struct student { long no; char name[20]; int score; } STU; // 函数声明 vo 阅读全文
posted @ 2021-12-30 23:59 黄哲豪 阅读(44) 评论(0) 推荐(0)
摘要: TEST1 #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; 阅读全文
posted @ 2021-12-21 18:10 黄哲豪 阅读(23) 评论(0) 推荐(0)
摘要: TEST1 #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 22:09 黄哲豪 阅读(22) 评论(1) 推荐(0)
摘要: TEST1 #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'}; // 定义一个char型数组 阅读全文
posted @ 2021-12-06 22:20 黄哲豪 阅读(36) 评论(1) 推荐(0)
摘要: TEST1 #include <stdio.h> double fun(int n); // 函数声明 int main() { int n; double s; printf("Enter n(1~10): "); while (scanf("%d", &n) != EOF) { s = fun( 阅读全文
posted @ 2021-11-30 00:03 黄哲豪 阅读(46) 评论(1) 推荐(0)
摘要: TEST1 #include <stdio.h> int main() { int num; scanf("%d", &num); printf("2049%04d\n", num); scanf("%d", &num); printf("2049%04d\n", num); scanf("%d", 阅读全文
posted @ 2021-11-16 23:29 黄哲豪 阅读(28) 评论(3) 推荐(0)
摘要: 任务1 #include<stdio.h> int main() { printf(" o\n"); printf("<H>\n"); printf("I I\n"); return 0; } #include <stdio.h> int main() { printf(" o o\n"); pri 阅读全文
posted @ 2021-10-31 16:40 黄哲豪 阅读(36) 评论(0) 推荐(0)