会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
yangyupeng2024
博客园
首页
新随笔
联系
订阅
管理
2024年12月30日
实验7 文件应用编程
摘要: 4. 实验任务4:文件简单应用 #include<stdio.h> int main() { FILE *fp; char ch; int line = 0,num = 0; fp = fopen("C:\\Users\\ASUS\\Desktop\\data4.txt","r"); if(!fp)
阅读全文
posted @ 2024-12-30 19:44 杨玉鹏
阅读(13)
评论(0)
推荐(0)
2024年12月22日
实验6 C语言结构体、枚举应用编程
摘要: 4. 实验任务4 #include <stdio.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_price; // 售
阅读全文
posted @ 2024-12-22 17:01 杨玉鹏
阅读(10)
评论(0)
推荐(0)
2024年12月8日
实验5 C语言指针应用编程
摘要: 1. 实验任务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 @ 2024-12-08 19:49 杨玉鹏
阅读(43)
评论(0)
推荐(0)
2024年11月10日
实验4 C语言数组应用编程
摘要: 1. 实验任务1 #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", sizeof(
阅读全文
posted @ 2024-11-10 16:47 杨玉鹏
阅读(23)
评论(0)
推荐(0)
2024年10月29日
实验3 C语言函数应用编程
摘要: 1. 实验任务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 @ 2024-10-29 17:38 杨玉鹏
阅读(43)
评论(0)
推荐(0)
2024年10月13日
实验2 C语言分支与循环基础应用编程
摘要: #include<stdio.h> #include<stdlib.h> #include<time.h> #define N 5 #define N1 397 #define N2 476 #define N3 21 int main() { int cnt; int random_major,r
阅读全文
posted @ 2024-10-13 15:42 杨玉鹏
阅读(36)
评论(0)
推荐(0)
2024年10月1日
实验1 C语言输入输出和简单程序编写
摘要: 1. 实验任务1 #include<stdio.h> int main() { printf(" o o\n"); printf("<H> <H>\n"); printf("I I I I\n"); return 0; } 2. 实验任务2 // 从键盘上输入三个数据作为三角形边长,判断其能否构成三
阅读全文
posted @ 2024-10-01 16:44 杨玉鹏
阅读(106)
评论(0)
推荐(0)
公告