摘要: 实验任务4 实验代码: #include<stdio.h> int cnt_chars(); int cnt_lines(); int main(){ int lines,chars; printf("data4.txt统计结果:\n"); lines=cnt_lines(); printf("行数 阅读全文
posted @ 2025-06-06 23:52 子春拾捌 阅读(21) 评论(0) 推荐(0)
摘要: 实验任务4 实验代码: #include <stdio.h> #define N 10 typedef struct{ char isbn[20]; char name[80]; char author[80]; double sales_price; int sales_count; }book; 阅读全文
posted @ 2025-05-29 08:32 子春拾捌 阅读(22) 评论(0) 推荐(0)
摘要: 实验任务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 *pmax) 阅读全文
posted @ 2025-05-16 21:05 子春拾捌 阅读(12) 评论(0) 推荐(0)
摘要: 实验任务1 实验代码: #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) pr 阅读全文
posted @ 2025-04-19 19:46 子春拾捌 阅读(20) 评论(0) 推荐(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( 阅读全文
posted @ 2025-04-04 21:40 子春拾捌 阅读(33) 评论(0) 推荐(0)
摘要: 实验任务1 实验代码: #include<stdio.h> #include<stdlib.h> #include<time.h> #define N 5 int main() { int number; int i; srand(time(0)); for (i = 0; i < N; ++i) 阅读全文
posted @ 2025-03-19 22:57 子春拾捌 阅读(14) 评论(0) 推荐(0)
摘要: 实验1 实验1代码①(一个小人): //打印字符小人 #include<stdio.h> #include<stdlib.h> int main() { printf(" O\n"); printf("<H>\n"); printf("I I\n"); system("pause"); return 阅读全文
posted @ 2025-03-06 17:33 子春拾捌 阅读(27) 评论(0) 推荐(0)