摘要: 任务4 点击查看代码 #include<stdio.h> int main(){ FILE *fp; int line=0; int num=0; char ch; fp=fopen("data4.txt","r"); if(fp==NULL){ perror("打开data4.txt失败"); r 阅读全文
posted @ 2025-12-31 11:46 牛汝顺 阅读(6) 评论(1) 推荐(0)
摘要: test1 点击查看代码 #include<stdio.h> #include<string.h> #define N 2 typedef struct student{ int id; char name[20]; char subject[20]; double perf; double mid 阅读全文
posted @ 2025-12-25 13:21 牛汝顺 阅读(10) 评论(1) 推荐(0)
摘要: task1_1 点击查看代码 #include<stdio.h> #define N 5 void input(int x[],int n); void output(int x[],int n); void find_min_max(int x[],int n,int *pmin,int *pma 阅读全文
posted @ 2025-12-11 17:27 牛汝顺 阅读(18) 评论(1) 推荐(0)
摘要: 实验一 点击查看代码 #include<stdio.h> #define N 4 #define M 2 void test1(){ int x[N]={1,9,8,4}; int i; printf("sizeof(x)=%d\n",sizeof(x)); for(i=0;i<N;i++) pri 阅读全文
posted @ 2025-11-16 14:08 牛汝顺 阅读(20) 评论(1) 推荐(0)
摘要: 实验1 点击查看代码 #include<stdio.h> char score_to_grade(int score); int main(){ int score; char grade; while(scanf("%d",&score)!=EOF){ grade=score_to_grade(s 阅读全文
posted @ 2025-10-25 17:58 牛汝顺 阅读(18) 评论(1) 推荐(0)
摘要: 实验一 点击查看代码 #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 #define N1 80 #define N2 35 int main() { int cnt; int random_major, ra 阅读全文
posted @ 2025-10-16 20:12 牛汝顺 阅读(21) 评论(1) 推荐(0)
摘要: 实验任务1 点击查看代码 #include<stdio.h> int main(){ printf(" O\n"); printf("<H>\n"); printf("I I\n"); printf(" O\n"); printf("<H>\n"); printf("I I\n"); return 阅读全文
posted @ 2025-09-28 19:45 牛汝顺 阅读(25) 评论(1) 推荐(0)