会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Uzivn
博客园
首页
新随笔
联系
订阅
管理
2020年1月
实验七
摘要: part 1 验证性实验二 仍然正确 总结: 二进制文件与文本文件的区别: 文本文件只能存储char型字符变量,二进制文件可以存储char/int等各种变量值。 #include <stdio.h> #include <stdlib.h> #include <string.h> const int
阅读全文
posted @ 2020-01-01 02:29 Uzivn
阅读(106)
评论(2)
推荐(0)
2019年12月
实验6
摘要: #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-23 17:05 Uzivn
阅读(112)
评论(2)
推荐(0)
实验五
摘要: // 练习:使用二分查找,在一组有序元素中查找数据项 // 形参是数组,实参是数组名 #include <stdio.h> #include <stdlib.h> const int N=5; int binarySearch(int x[], int n, int item); // 函数声明 i
阅读全文
posted @ 2019-12-18 00:08 Uzivn
阅读(116)
评论(3)
推荐(0)
实验四
摘要: #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-02 20:34 Uzivn
阅读(115)
评论(2)
推荐(0)
2019年11月
实验三
摘要: // 一元二次方程求解 // 重复执行, 直到按Ctrl+D或Ctrl+E结束 // #include <math.h> #include <stdio.h> #include <stdlib.h> int main() { float a, b, c, x1, x2; float delta, r
阅读全文
posted @ 2019-11-20 00:13 Uzivn
阅读(101)
评论(4)
推荐(0)
实验二
摘要: int main() { int x=1234; float f=123.456; double m=123.456; char ch='a'; char a[]="Hello, world!"; // 定义一个数组a,数组中连续存放了字符串常量hello,world! int y=3, z=4;
阅读全文
posted @ 2019-11-06 00:28 Uzivn
阅读(102)
评论(3)
推荐(0)
2019年10月
实验1
摘要: #include #include int main() { int a; printf("请输入一个整数:"); scanf("%d",&a); if(a%2==0) printf("%d为偶数!",a); else printf("%d为奇数!"); system("pause"); return 0; } #...
阅读全文
posted @ 2019-10-22 09:21 Uzivn
阅读(123)
评论(0)
推荐(0)
公告