会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
bobo哥
博客园
首页
新随笔
联系
管理
订阅
上一页
1
···
29
30
31
32
33
34
35
36
37
···
54
下一页
2019年12月20日
图--拓扑排序--p153
摘要: 源程序:在vc++6.0中运行通过 // c0,c1,c2,c3,c4四个结点,在程序中和0,1,2,3,4来表示 // main.cpp // top_sort // // Created by duanqibo on 2019/12/20. // Copyright © 2019年 duanqi
阅读全文
posted @ 2019-12-20 15:23 bobo哥
阅读(192)
评论(0)
推荐(0)
2019年12月18日
自考新教材--p179
摘要: 源程序: #include <iostream> using namespace std; class BaseClass { public: int v1, v2; BaseClass() { v1 = 1; v2 = 1; } int temp1() {} }; class DerivedCla
阅读全文
posted @ 2019-12-18 17:23 bobo哥
阅读(125)
评论(0)
推荐(0)
自考新教材--p154
摘要: 源程序: // // main.cpp // p154 // // Created by duanqibo on 2019/12/18. // Copyright © 2019年 duanqibo. All rights reserved. // #include <iostream> using
阅读全文
posted @ 2019-12-18 16:24 bobo哥
阅读(185)
评论(0)
推荐(0)
自考新教材--p152
摘要: 源程序: //"+"、"-"运算符重载 #include <iostream> using namespace std; class myComplex { private: double real, imag; public: myComplex(); myComplex(double x, do
阅读全文
posted @ 2019-12-18 14:56 bobo哥
阅读(208)
评论(0)
推荐(0)
2019年12月15日
判断一个整数是否为素数--简单
摘要: 源程序: #include <stdio.h>#include <stdlib.h>#include <math.h>void prime(int m){ int k,i; k = (int) sqrt(m); for (i = 2; i <= k; i++) if (m % i == 0) bre
阅读全文
posted @ 2019-12-15 16:07 bobo哥
阅读(940)
评论(0)
推荐(0)
2019年12月13日
把从键盘输入的文本按原样输出到名为file_a.txt的文件中,用字符@作为键盘输入结束的标志
摘要: 源程序: //把从键盘输入的文本按原样输出到名为file_a.txt的文件中,用字符@作为键盘输入//结束的标志#include <stdio.h>#include <stdlib.h>int main(){ FILE *fpout; char ch; if((fpout=fopen("e:\\fi
阅读全文
posted @ 2019-12-13 09:31 bobo哥
阅读(817)
评论(0)
推荐(0)
把一个已经存在磁盘上的file_a.txt文本文件中的内容原样输出到终端上
摘要: 源程序: //把一个已经存在磁盘上的file_a.txt文本文件中的内容原样输出到终端上#include <stdio.h>#include <stdlib.h>int main(){ FILE *fpin; char ch; if((fpin=fopen("e:\\file_a.txt","r")
阅读全文
posted @ 2019-12-13 09:26 bobo哥
阅读(349)
评论(0)
推荐(0)
调用fputs函数,把10个字符串输出到文件中,再从此文件中读入这10个字符串放在一个字符串数组中;最后把字符串数组中的字符串输出到终端屏幕。
摘要: 源程序: #include <stdio.h>#include <stdlib.h>int main(){ int i; char s[100]; FILE *fp; if((fp=fopen("e:\\file.txt","w+"))==NULL) { printf("can't open thi
阅读全文
posted @ 2019-12-13 09:22 bobo哥
阅读(1700)
评论(1)
推荐(1)
编写程序,用于把一个文本文件(源文件)复制到另一个文件(目标文件)中。 源文件名为file_a.txt, 目标文件名为file_b.txt
摘要: 源程序: #include <stdio.h>#include <stdlib.h>void filecopy(FILE *,FILE *);int main(){ FILE *fpin,*fpout; fpin=fopen("e:\\file_a.txt","r"); fpout=fopen("e
阅读全文
posted @ 2019-12-13 09:16 bobo哥
阅读(1764)
评论(0)
推荐(0)
2019年12月11日
自考新教材--p103(复制的构造函数)
摘要: 源程序: #include <iostream> #include <string> using namespace std; class myDate { private: int year, month, day; public: myDate(); void setDate(int y,int
阅读全文
posted @ 2019-12-11 13:41 bobo哥
阅读(205)
评论(0)
推荐(0)
上一页
1
···
29
30
31
32
33
34
35
36
37
···
54
下一页
公告