摘要: task4 源代码: #include <stdio.h> // 用于判断空白符(空格、换行、制表符等) #include <ctype.h> int main() { // 打开文件,"r" 只读模式 FILE *file = fopen("data4.txt", "r"); if (file = 阅读全文
posted @ 2025-06-09 10:29 阿晏ing 阅读(11) 评论(0) 推荐(0)
摘要: task4 源代码: include <stdio.h> define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_price; // 售 阅读全文
posted @ 2025-06-01 10:44 阿晏ing 阅读(31) 评论(0) 推荐(0)
摘要: task1_1.c 程序源码: include <stdio.h> define N 5 void input(int x[], int n); void output(int x[], int n); void find_min_max(int x[], int n, int *pmin, int 阅读全文
posted @ 2025-05-18 20:02 阿晏ing 阅读(10) 评论(0) 推荐(0)
摘要: task1.c 源代码: include <stdio.h> define N 4 define M 2 void test1() { int x[N] = {1, 9, 8, 4}; int i; // 输出数组x占用的内存字节数 printf("sizeof(x) = %d\n", sizeof 阅读全文
posted @ 2025-04-20 23:49 阿晏ing 阅读(16) 评论(0) 推荐(0)
摘要: task1.c include <stdio.h> char score_to_grade(int score); // 函数声明 int main() { int score; char grade; while(scanf_s("%d", &score) != EOF) { grade = sc 阅读全文
posted @ 2025-04-08 20:26 阿晏ing 阅读(15) 评论(0) 推荐(0)
摘要: task1.c 源代码: include <stdio.h> include <stdlib.h> include <time.h> define N 5 int main() { int number; int i; srand(time(0)); // 以当前系统时间作为随机种子 for(i = 阅读全文
posted @ 2025-03-23 00:11 阿晏ing 阅读(33) 评论(0) 推荐(0)
摘要: task1_1.c //打印两个水平排列的字符小人 include<stdio.h> int main() { printf(" o o \n"); printf("<H> <H>\n"); printf("I I I I\n"); return 0; } task1_2.c //在水平方向上打印出 阅读全文
posted @ 2025-03-10 12:46 阿晏ing 阅读(13) 评论(0) 推荐(0)