会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
土土开开
博客园
首页
新随笔
联系
订阅
管理
2019年12月28日
实验七
摘要: part1 ex1-2 如果不知道人数 将for(i=0; i<N; i++) 改为 while( !feof(fp) 结果仍然正确 ex1-3 运行程序,观察在屏幕上是否正确输出了按分数高到底排序的信息?同时,在当前路径下,是否生成了二进制 文件file4.dat?用记事本程序尝试打开文件file4.
阅读全文
posted @ 2019-12-28 19:42 土土开开
阅读(106)
评论(2)
推荐(0)
2019年12月19日
实验六
摘要: ex1-2 #include <stdlib.h> const int N=5; // 定义结构体类型struct student,并定义STU为其别名 typedef struct student { long no; char name[20]; int score; }STU; // 函数声明
阅读全文
posted @ 2019-12-19 13:48 土土开开
阅读(98)
评论(2)
推荐(0)
2019年12月15日
实验五
摘要: ex2_1_1 // 形参是数组,实参是数组名 #include <stdio.h>#include <stdlib.h> const int N=5; int binarySearch(int x[], int n, int item); // 函数声明 int main() { int a[N]
阅读全文
posted @ 2019-12-15 17:05 土土开开
阅读(151)
评论(3)
推荐(0)
2019年11月30日
实验四
摘要: part 2 //寻找两个整数之间的所有素数(包括这两个整数),把结果保存在数组bb中,函数返回素数的个数。 // 例如,输入6和21,则输出为:7 11 13 17 19。 #include <stdio.h>#include <stdlib.h> #define N 1000int fun(in
阅读全文
posted @ 2019-11-30 21:17 土土开开
阅读(83)
评论(2)
推荐(0)
2019年11月17日
实验三
摘要: part 1: 一元二次方程求解 #include <math.h>#include <stdio.h>#include <stdlib.h>int main() { float a, b, c, x1, x2; float delta, real, imag; printf("Enter a, b
阅读全文
posted @ 2019-11-17 00:27 土土开开
阅读(107)
评论(1)
推荐(0)
2019年11月3日
实验二
摘要: #include<stdio.h>#include<stdlib.h>int main(){ int year,month,day,leapyear; scanf("%d%d",&year,&month); if(year<0||month<1||month>12) {printf("输入的数据错误
阅读全文
posted @ 2019-11-03 13:04 土土开开
阅读(115)
评论(3)
推荐(0)
2019年10月23日
实验
摘要: #include <stdio.h>int main(){ int x; printf("输入一个整数:\n"); scanf("%d",&x); if(x%2==1) printf("jishu");else printf("oushu"); return 0; } #include <stdio
阅读全文
posted @ 2019-10-23 11:57 土土开开
阅读(105)
评论(0)
推荐(0)
公告