摘要: 实验任务4 源代码 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 int main(){ 5 FILE *fp; 6 char ch; 7 int line=0; 8 int char_count=0; 9 fp=fo 阅读全文
posted @ 2025-12-24 22:16 wsh12345 阅读(16) 评论(1) 推荐(0)
摘要: 实验任务4 源代码 1 #include <stdio.h> 2 #define N 10 3 4 typedef struct { 5 char isbn[20]; 6 char name[80]; 7 char author[80]; 8 double sales_price; 9 int sa 阅读全文
posted @ 2025-12-20 14:07 wsh12345 阅读(15) 评论(1) 推荐(0)
摘要: 实验任务1.1 源代码 1 #include<stdio.h> 2 #include<stdlib.h> 3 #define N 5 4 void input(int x[],int n); 5 void output(int x[],int n); 6 void find_min_max(int 阅读全文
posted @ 2025-12-08 16:42 wsh12345 阅读(13) 评论(1) 推荐(0)
摘要: Test1 1 #include<stdio.h> 2 #define N 4 3 #define M 2 4 void test1(){ 5 int x[N]={1,9,8,4}; 6 int i; 7 printf("sizeof(x)=%d\n",sizeof(x)); 8 for(i=0;i 阅读全文
posted @ 2025-11-14 16:05 wsh12345 阅读(14) 评论(1) 推荐(0)
摘要: 实验结论 实验任务1 源代码 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 gra 阅读全文
posted @ 2025-10-24 22:11 wsh12345 阅读(10) 评论(1) 推荐(0)
摘要: 实验结论 实验任务1 源代码 1 int main(){ 2 int cnt; 3 int random_major,random_no; 4 srand(time(NULL)); 5 cnt =0; 6 while(cnt<N){ 7 random_major =rand()%2; 8 if(ra 阅读全文
posted @ 2025-10-14 20:27 wsh12345 阅读(15) 评论(1) 推荐(0)
摘要: 实验结论 实验任务1 task1_1.c 源代码 1 #include<stdio.h> 2 int main() 3 { printf(" o \n"); 5 printf("<H>\n"); 6 printf("I I\n"); 7 printf(" o \n"); 8 printf("<H>\ 阅读全文
posted @ 2025-09-27 11:27 wsh12345 阅读(56) 评论(1) 推荐(0)