会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
曾经走过
博客园
首页
新随笔
联系
订阅
管理
2020年1月1日
实验七
摘要: // 将file1.txt中小写字母转换成大写后,另存为file2.txt #include <stdio.h> #include <stdlib.h> int main() { FILE *fin, *fout; // 定义文件类型指针 int ch; fin = fopen("file1.txt
阅读全文
posted @ 2020-01-01 08:27 曾经走过
阅读(138)
评论(0)
推荐(0)
2019年12月22日
实验六
摘要: #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-22 16:35 曾经走过
阅读(107)
评论(0)
推荐(0)
2019年12月15日
实验五
摘要: // 这个程序用于观察数组中的一组数据元素在内存中是否是连续存放的 // 以及数组元素的直接访问与间接访问 #include <stdio.h> #include <stdlib.h> const int N=3; int main() { int a[N] = {1, 2, 3}; // 定义一维
阅读全文
posted @ 2019-12-15 11:42 曾经走过
阅读(142)
评论(1)
推荐(0)
2019年12月3日
实验四
摘要: //寻找两个整数之间的所有素数(包括这两个整数),把结果保存在数组bb中,函数返回素数的个数。 // 例如,输入6和21,则输出为:7 11 13 17 19。 #include <stdio.h> #include <stdlib.h> #define N 1000 int fun(int n,i
阅读全文
posted @ 2019-12-03 08:53 曾经走过
阅读(119)
评论(0)
推荐(0)
2019年11月18日
实验三
摘要: // 一元二次方程求解 // 重复执行, 直到按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-18 10:29 曾经走过
阅读(129)
评论(0)
推荐(0)
2019年11月3日
实验二
摘要: 第一行正常 第二行值相同,格式不同 第三行%8d,%2d 数据域宽分别为8,2.不满域宽,左补空格 第四行f , 默认小数点后6位 8f 满足 8.1f域宽为8,点后为1 先点则缺域宽,左补齐 0.2f同理 .2e科学计数法,小数点后2位 第五行lf 小数点后6位 第六行 3c 域宽为3的字符型 第
阅读全文
posted @ 2019-11-03 11:56 曾经走过
阅读(175)
评论(3)
推荐(0)
2019年10月19日
实验1
摘要: #include<stdio.h> int main() { printf("201983270542\n"); printf("Hell,Mars!\n"); return 0; } /*求整数乘积*/ #include<stdio.h> int product(int,int); int main(void) { int x,y,s; scanf("%d%d",&x,&y); s=produc
阅读全文
posted @ 2019-10-19 09:45 曾经走过
阅读(167)
评论(0)
推荐(0)
公告