摘要: task 1 // 文件读写操作:格式化读、写文本文件 #include <stdio.h> #include <stdlib.h> #define N 80 #define M 100 typedef struct { char name[N]; // 书名 char author[N]; // 阅读全文
posted @ 2025-06-04 14:24 飞嘟 阅读(21) 评论(0) 推荐(0)
摘要: task 1 // P286例8.17 // 对教材示例代码作了微调,把输出学生信息单独编写成一个函数模块 // 打印不及格学生信息、打印所有学生信息均调用该模块实现 #include <stdio.h> #include <string.h> #include <stdlib.h> #define 阅读全文
posted @ 2025-05-29 16:53 飞嘟 阅读(9) 评论(0) 推荐(0)
摘要: task1 #include <stdio.h> #include <stdlib.h> #define N 5 void input(int x[], int n); void output(int x[], int n); void find_min_max(int x[], int n, in 阅读全文
posted @ 2025-05-18 21:11 飞嘟 阅读(10) 评论(0) 推荐(0)
摘要: task1 #include <stdio.h> #define N 4 #define M 2 #include <stdlib.h> void test1() { int x[N] = {1, 9, 8, 4}; int i; // 输出数组x占用的内存字节数 printf("sizeof(x) 阅读全文
posted @ 2025-04-17 23:03 飞嘟 阅读(14) 评论(0) 推荐(0)
摘要: task1 #include <stdio.h> #include<stdlib.h> char score_to_grade(int score); // 函数声明 int main() { int score; char grade; while(scanf("%d", &score) != E 阅读全文
posted @ 2025-04-05 22:53 飞嘟 阅读(27) 评论(0) 推荐(0)
摘要: task1 #include<stdio.h> #include<stdlib.h> #include<time.h> #define N 5 int main(){ int number; int i; srand(time(0));//以当前系统时间作为随机种子 for(i=0;i<N;i++) 阅读全文
posted @ 2025-03-20 14:35 飞嘟 阅读(15) 评论(0) 推荐(0)
摘要: //task 1_1.c#include<stdio.h> #include<stdlib.h> int main() { printf(" O \n"); printf("<H>\n"); printf("I I\n"); printf(" O \n"); printf("<H>\n"); pri 阅读全文
posted @ 2025-03-05 20:56 飞嘟 阅读(18) 评论(0) 推荐(0)