• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
fere
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

2019年12月25日

实验七
摘要: #include <stdlib.h> int main() { FILE *fin, *fout; // 定义文件类型指针 int ch; fin = fopen("file1.txt", "r"); // 以只读文本方式打开文件file1.txt if (fin == NULL) { print 阅读全文
posted @ 2019-12-25 16:47 fere 阅读(121) 评论(1) 推荐(0)
 
 

2019年12月21日

实验六
摘要: // P280例8.15 // 对教材上的程序作了微调整,把输出学生信息单独编写成一个函数模块 // 打印不及格学生信息和所有学生信息程分别调用 #include<stdio.h> #include<stdlib.h>> #include<string.h> #define N 3 // 运行程序输 阅读全文
posted @ 2019-12-21 22:33 fere 阅读(131) 评论(1) 推荐(0)
 
 

2019年12月14日

实验五
摘要: #include <stdio.h> #include <stdlib.h> const int N=3; int main() { int a[N] = {1, 2, 3}; // 定义一维数组a,包含3个整型数据,并对其初始化,3个元素初始值分别是1,2,3 int i; // 以"地址:值"的 阅读全文
posted @ 2019-12-14 23:19 fere 阅读(117) 评论(1) 推荐(0)
 
 

2019年11月27日

实验四
摘要: #include <math.h> #include <stdio.h> #include <stdlib.h> // 函数声明 void solve(double a, double b, double c); // 主函数 int main() { double a, b, c; printf( 阅读全文
posted @ 2019-11-27 22:22 fere 阅读(101) 评论(1) 推荐(0)
 
 

2019年11月16日

实验三
摘要: // 一元二次方程求解 // 重复执行, 直到按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-16 15:24 fere 阅读(134) 评论(1) 推荐(0)
 
 

2019年10月31日

实验二part3.1
摘要: #include<stdio.h>int main(){ int x; printf("请输入一个三位数以内的十进制数:"); scanf("%d",&x); printf("正在计算其逆序....\n"); if (x>=0&&x<10) printf("%d的正序与逆序相同",x); else 阅读全文
posted @ 2019-10-31 11:43 fere 阅读(127) 评论(1) 推荐(0)
 
实验二part3.3
摘要: #include<stdio.h>#include<stdlib.h>int main(){ int sce,a; printf("请输入分数;"); scanf("%d",&sce); if(sce<0||sce>100){ printf("分数不在有效区间\n"); exit(0); } a=s 阅读全文
posted @ 2019-10-31 11:23 fere 阅读(81) 评论(0) 推荐(0)
 
实验二part3.2
摘要: #include<stdio.h>#include<stdlib.h>int main(){ int year,month,day,leapyear; printf("请输入年份 月份"); scanf("%d %d",&year,&month); if(year<0||month<0||month 阅读全文
posted @ 2019-10-31 10:56 fere 阅读(90) 评论(0) 推荐(0)
 
实验二part2.2
摘要: #include <stdio.h>#include <stdlib.h>int main() { int choice; printf("输入0~9以内的数字,选择屏幕背景色前景色方案: \n"); printf("1-\t黑底绿色\n"); printf("2-\t白底黑色\n"); print 阅读全文
posted @ 2019-10-31 09:49 fere 阅读(102) 评论(0) 推荐(0)
 
实验二三角形改
摘要: #include <stdio.h> int main() { double a,b,c; scanf("%lf %lf %lf", &a, &b, &c); if(a<0 || b<0 || c<0) printf("不能构成三角形\n"); else if(a+b>c && a+c>b && b 阅读全文
posted @ 2019-10-31 09:31 fere 阅读(89) 评论(0) 推荐(0)
 
 
下一页

公告


博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3