摘要: 实验任务4 源代码 1 #include <stdio.h> 2 int main() { 3 FILE *fp = fopen("D:\\data4.txt", "r"); 4 int lines = 0, chars = 0; 5 int i; 6 char s[100]; 7 8 if (fp 阅读全文
posted @ 2025-06-07 16:01 孙姚奕 阅读(24) 评论(0) 推荐(0)
摘要: 实验任务4 源代码 1 #include <stdio.h> 2 #define N 10 3 4 typedef struct { 5 char isbn[20]; // isbn号 6 char name[80]; // 书名 7 char author[80]; // 作者 8 double 阅读全文
posted @ 2025-06-02 16:54 孙姚奕 阅读(9) 评论(0) 推荐(0)
摘要: 实验任务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-18 21:12 孙姚奕 阅读(13) 评论(0) 推荐(0)
摘要: 实验任务1 源代码 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 printf("sizeof(x) = %d\n", sizeo 阅读全文
posted @ 2025-04-14 20:16 孙姚奕 阅读(20) 评论(0) 推荐(0)
摘要: 实验任务1 源代码 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) ! 阅读全文
posted @ 2025-04-06 15:55 孙姚奕 阅读(25) 评论(0) 推荐(0)
摘要: 实验任务1 源代码 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <time.h> 4 #define N 5 5 int main() 6 { 7 int number; 8 int i; 9 srand(time(0)); 10 fo 阅读全文
posted @ 2025-03-17 22:22 孙姚奕 阅读(22) 评论(0) 推荐(0)
摘要: 实验任务1 源代码 1 #include<stdio.h> 2 int main() 3 { 4 printf(" 0 0\n"); 5 printf("<H> <H>\n"); 6 printf("I I I I\n"); 7 8 9 return 0; 10 } 11 #include<stdi 阅读全文
posted @ 2025-03-08 01:44 孙姚奕 阅读(33) 评论(0) 推荐(0)