摘要: task.4 1 #include <stdio.h> 2 #include <ctype.h> 3 #include <stdlib.h> 4 5 int main() { 6 FILE *file; 7 char filename[] = "data4.txt"; 8 int line_coun 阅读全文
posted @ 2025-06-07 18:26 林觉得冷 阅读(9) 评论(0) 推荐(0)
摘要: task.4 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-01 21:03 林觉得冷 阅读(7) 评论(0) 推荐(0)
摘要: task.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 *pm 阅读全文
posted @ 2025-05-18 21:57 林觉得冷 阅读(7) 评论(0) 推荐(0)
摘要: 实验四 test.1 1 #include <stdio.h> 2 #include <stdlib.h> 3 #define N 4 4 #define M 2 5 6 void test1() { 7 int x[N] = {1, 9, 8, 4}; 8 int i; 9 10 // 输出数组x 阅读全文
posted @ 2025-04-20 14:50 林觉得冷 阅读(4) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 char score_to_grade(int score); // 函数声明 3 int main() { 4 int score; 5 char grade; 6 while(scanf("%d", &score) != EOF) { 7 grade 阅读全文
posted @ 2025-04-09 10:33 林觉得冷 阅读(6) 评论(0) 推荐(0)
摘要: 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-24 06:34 林觉得冷 阅读(7) 评论(0) 推荐(0)
摘要: 代码 #include<stdio.h> #include<stdlib.h> int main() { printf(" 0 \n"); printf("<H>\n"); printf("I I\n"); system("pause"); return 0; } 结果 代码 // 打印垂直两个字符 阅读全文
posted @ 2025-03-08 16:17 林觉得冷 阅读(9) 评论(0) 推荐(0)