会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
王大拿拿拿
博客园
首页
新随笔
联系
订阅
管理
2020年1月1日
实验七
摘要: 验证性实验二 仍然正确 总结: 二进制文件与文本文件的区别: 文本文件编辑器就可以读写,二进制文件需要特别的解码器。 文本文件只能存储char型字符变量,二进制文件可以存储char/int等各种变量值。 #include <stdio.h> #include <stdlib.h> #define N
阅读全文
posted @ 2020-01-01 01:03 王大拿拿拿
阅读(103)
评论(2)
推荐(0)
2019年12月24日
实验六
摘要: #include <stdio.h> #include <stdlib.h> const int N=5; // 定义结构体类型struct student,并定义STU为其别名 typedef struct student { long no; char name[20]; int score;
阅读全文
posted @ 2019-12-24 15:49 王大拿拿拿
阅读(112)
评论(2)
推荐(0)
2019年12月17日
实验五
摘要: // 练习:使用二分查找,在一组有序元素中查找数据项 // 形参是数组,实参是数组名 #include <stdio.h> #include <stdlib.h> const int N=5; int binarySearch(int x[], int n, int item); // 函数声明 i
阅读全文
posted @ 2019-12-17 11:51 王大拿拿拿
阅读(95)
评论(3)
推荐(0)
2019年12月3日
实验四
摘要: #include <stdio.h> #include <stdlib.h> #define N 1000 int fun(int n,int m,int bb[N]) { int i,j,k=0,flag; for(j=n;j<=m;j++) { flag=1; for(i=2;i<j;i++)
阅读全文
posted @ 2019-12-03 12:41 王大拿拿拿
阅读(120)
评论(3)
推荐(0)
2019年11月19日
实验三
摘要: 通过将scanf输入a,b,c作为while的判断的表达式,达到多组输入的效果。只要输入数字,就符合循环的条件。 #include <stdio.h> #include <stdlib.h> int main() { int number, max, min, n; n=1; printf("输入第
阅读全文
posted @ 2019-11-19 01:03 王大拿拿拿
阅读(113)
评论(3)
推荐(0)
2019年11月6日
实验二
摘要: //part1 ex2.1#include <stdio.h> int main() { int x=1234; float f=123.456; double m=123.456; char ch='a'; char a[]="Hello, world!"; int y=3, z=4; print
阅读全文
posted @ 2019-11-06 02:08 王大拿拿拿
阅读(107)
评论(6)
推荐(0)
2019年10月22日
实验一
摘要: #include <stdio.h> int main() { int x; printf("输入一个整数: \n"); scanf("%d",&x); if( x%2==0) printf("是偶数"); else printf("是奇数"); return 0; } #include <stdio.h> int main() { int days; printf("输入一个整数: \n");
阅读全文
posted @ 2019-10-22 00:36 王大拿拿拿
阅读(91)
评论(0)
推荐(0)
2019年10月21日
工作日休息日
摘要: #include <stdio.h> int main() { int days; printf("输入一个整数: \n"); scanf("%d",&days); if(1<=days&&days<=5) printf("workdays, fighting\n"); else if(6<=day
阅读全文
posted @ 2019-10-21 11:17 王大拿拿拿
阅读(83)
评论(0)
推荐(0)
2019年10月20日
实验一 判断奇偶
摘要: #include <stdio.h> int main() { int x; printf("输入一个整数: \n"); scanf("%d",&x); if( x%2==0) printf("是偶数"); else printf("是奇数"); return 0; }
阅读全文
posted @ 2019-10-20 22:29 王大拿拿拿
阅读(105)
评论(0)
推荐(0)
公告