会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
komeiji-
博客园
首页
新随笔
联系
订阅
管理
2025年6月8日
实验7_文件应用编程
摘要: 实验任务四 程序代码 #include <stdio.h> #include <stdlib.h> #include <ctype.h> int main(){ FILE *file = fopen("data4.txt","r"); if (file == NULL) { perror("无法打开
阅读全文
posted @ 2025-06-08 00:02 古明地理
阅读(17)
评论(0)
推荐(0)
2025年6月2日
实验6 C语⾔结构体、枚举应⽤编程
摘要: 实验任务四 程序代码 #include <stdio.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_price; //
阅读全文
posted @ 2025-06-02 20:29 古明地理
阅读(15)
评论(0)
推荐(0)
2025年5月19日
实验5 C语⾔指针应⽤编程
摘要: 实验任务一 task1_1.c 程序代码 #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 *pm
阅读全文
posted @ 2025-05-19 10:49 古明地理
阅读(23)
评论(0)
推荐(0)
2025年4月21日
实验4 C语⾔数组应⽤编程
摘要: 实验任务一 程序代码 #include <stdio.h> #define N 4 #define M 2 void test1() { int x[N] = {1, 9, 8, 4}; int i; // 输出数组x占用的内存字节数 printf("sizeof(x) = %d\n", sizeo
阅读全文
posted @ 2025-04-21 10:41 古明地理
阅读(20)
评论(0)
推荐(0)
2025年4月9日
实验3 C语言函数应用编程
摘要: 实验任务1 程序代码 #include <stdio.h> char score_to_grade(int score); int main() { int score; char grade; while(scanf("%d", &score) != EOF) { grade = score_to
阅读全文
posted @ 2025-04-09 18:06 古明地理
阅读(23)
评论(0)
推荐(0)
2025年3月22日
实验2 C语言分支与循环基础应用编程
摘要: 实验任务1 程序代码 #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 int main() { int number; int i; srand(time(0)); // 以当前系统时间作为随机种子 for(i
阅读全文
posted @ 2025-03-22 23:34 古明地理
阅读(19)
评论(0)
推荐(0)
2025年3月8日
实验1 C语言输入输出和简单程序编写
摘要: 实验任务一 task1_1.c #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");
阅读全文
posted @ 2025-03-08 22:20 古明地理
阅读(31)
评论(0)
推荐(0)
公告