摘要: task 4 #include <stdio.h> #include <stdlib.h> #include <ctype.h> int main() { FILE *fp; int line_count=0; int char_count=0; int ch; fp=fopen("D:\\data 阅读全文
posted @ 2025-06-09 10:47 赵可妍 阅读(8) 评论(0) 推荐(0)
摘要: 任务四 #include <stdio.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_price; // 售价 int 阅读全文
posted @ 2025-06-02 19:45 赵可妍 阅读(12) 评论(0) 推荐(0)
摘要: 任务1 1.1 代码 1 #include <stdio.h> 2 #define N 5 3 4 void input(int x[], int n); 5 void output(int x[], int n); 6 void find_min_max(int x[], int n, int * 阅读全文
posted @ 2025-05-17 23:13 赵可妍 阅读(9) 评论(0) 推荐(0)
摘要: 任务1 代码 #include <stdio.h> #include<stdlib.h> #define N 4 #define M 2 void test1() { int x[N] = {1, 9, 8, 4}; int i; // 输出数组x占用的内存字节数 printf("sizeof(x) 阅读全文
posted @ 2025-04-20 14:16 赵可妍 阅读(6) 评论(0) 推荐(0)
摘要: 任务一 代码 #include <stdio.h> char score_to_grade(int score); // 函数声明 int main() { int score; char grade; while(scanf("%d", &score) != EOF) { grade = scor 阅读全文
posted @ 2025-04-06 22:26 赵可妍 阅读(13) 评论(0) 推荐(0)
摘要: 任务1 代码: 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <time.h> 4 5 #define N 5 6 7 int main() { 8 int number; 9 int i; 10 11 srand(time(0)); / 阅读全文
posted @ 2025-03-19 21:27 赵可妍 阅读(10) 评论(0) 推荐(0)
摘要: 实验1 task1.c 代码: #include <stdio.h> #include <stdlib.h> int main() { printf(" O \n"); printf("<H>\n"); printf(" I \n"); printf(" O \n"); printf("<H>\n" 阅读全文
posted @ 2025-03-09 14:57 赵可妍 阅读(18) 评论(0) 推荐(0)