摘要: task4 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 int main(){ 5 FILE *fp; 6 int s1=0,s2=0; 7 char c; 8 fp=fopen("data4.txt","r"); 9 while(!feof(fp) 阅读全文
posted @ 2025-06-09 09:25 我爱吃冰淇淋 阅读(5) 评论(0) 推荐(0)
摘要: task4 1 #include <stdio.h> 2 #include<stdlib.h> 3 #define N 10 4 5 typedef struct { 6 char isbn[20]; // isbn号 7 char name[80]; // 书名 8 char author[80] 阅读全文
posted @ 2025-06-02 21:58 我爱吃冰淇淋 阅读(5) 评论(0) 推荐(0)
摘要: task1-1 1 #include <stdio.h> 2 #include<stdlib.h> 3 #define N 5 4 5 void input(int x[], int n); 6 void output(int x[], int n); 7 void find_min_max(int 阅读全文
posted @ 2025-05-18 23:59 我爱吃冰淇淋 阅读(3) 评论(0) 推荐(0)
摘要: task1 1 #include <stdio.h> 2 #define N 4 3 #define M 2 4 5 void test1() { 6 int x[N] = {1, 9, 8, 4}; 7 int i; 8 9 // 输出数组x占用的内存字节数 10 printf("sizeof(x 阅读全文
posted @ 2025-04-20 21:19 我爱吃冰淇淋 阅读(3) 评论(0) 推荐(0)
摘要: task1 1 #include <stdio.h> 2 3 char score_to_grade(int score); // 函数声明 4 5 int main() { 6 int score; 7 char grade; 8 9 while(scanf("%d", &score) != EO 阅读全文
posted @ 2025-04-09 23:43 我爱吃冰淇淋 阅读(4) 评论(0) 推荐(0)
摘要: task1 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)); 12 阅读全文
posted @ 2025-03-23 23:08 我爱吃冰淇淋 阅读(7) 评论(0) 推荐(0)
摘要: task1 1 #include<stdlib.h> 2 #include<stdio.h> 3 int main() 4 { 5 printf(" O\n"); 6 printf("<H>\n"); 7 printf("I I\n"); 8 printf(" O\n"); 9 printf("<H 阅读全文
posted @ 2025-03-09 23:04 我爱吃冰淇淋 阅读(11) 评论(0) 推荐(0)