会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
文雨zyf
博客园
首页
新随笔
联系
订阅
管理
2021年6月15日
实验七
摘要: 实验任务一: #include <stdio.h> #include <stdlib.h> int main() { FILE *fin, *fout; // 定义文件类型指针 int ch; fin = fopen("file1.txt", "r"); // 以只读文本方式打开文件file1.tx
阅读全文
posted @ 2021-06-15 18:40 文雨zyf
阅读(58)
评论(2)
推荐(0)
2021年6月9日
实验六
摘要: 实验任务一 #include<stdio.h> #include<stdlib.h> #include<string.h> #define N 3 // 运行程序输入测试时,可以把N改小一些输入测试 typedef struct student { int id; /*学生学号 */ char na
阅读全文
posted @ 2021-06-09 17:08 文雨zyf
阅读(26)
评论(1)
推荐(0)
2021年5月27日
实验五
摘要: 实验任务一: #include <stdio.h> const int N=3; int main() { int a[N] = {1, 2, 3}; int i; printf("通过数组名和下标直接访问数组元素:\n"); for(i=0; i<N; i++) printf("%d: %d\n"
阅读全文
posted @ 2021-05-27 16:51 文雨zyf
阅读(38)
评论(2)
推荐(0)
2021年5月3日
实验四
摘要: #include <stdio.h> long long fun(int n); // 函数声明 int main() { int n; long long f; while(scanf("%d", &n) != EOF) { f = fun(n); // 函数调用 printf("n = %d,
阅读全文
posted @ 2021-05-03 09:02 文雨zyf
阅读(43)
评论(2)
推荐(0)
2021年4月13日
实验三——张翼飞
摘要: 实验任务一: // 生成N个0~99之间的随机整数,并打印输出 #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 int main() { int x, n; srand(time(0)); // 以当前系统时间
阅读全文
posted @ 2021-04-13 21:59 文雨zyf
阅读(71)
评论(2)
推荐(0)
2021年3月29日
实验二——张翼飞
摘要: 一、实验任务一 %04d表示四位存储,当不足四位的时候左侧用0来补齐,这样就可以将整个字符串规范化 二、实验任务二 三、实验任务三 四、实验任务四 五、实验任务五 六、实验任务六
阅读全文
posted @ 2021-03-29 20:14 文雨zyf
阅读(52)
评论(2)
推荐(0)
2021年3月14日
实验一
摘要: 实验任务一: 实验任务二: int为整型而float为浮点型,前者显示小数点后的数字而后者能显示小数点后的数字 实验任务三: 由于是整型变量,当数值是奇数的时候,除以2后小数点后的数字被抹去,最终影响最后结果。 实验任务4: 实验总结: 通过本次实验,我主要体会到了整型与浮点型常量的不同,运算顺序对
阅读全文
posted @ 2021-03-14 21:46 文雨zyf
阅读(54)
评论(0)
推荐(0)
公告