第十六周实践项目之阅读程序————4
2016-06-13 08:25
274 查看
问题及代码:
/*copyright(c)2016.烟台大学计算机学院
* All rights reserved,
* 文件名称:text.Cpp
* 作者:吴敬超
* 完成日期:2016年6月13日
* 版本号:codeblock
*
* 问题描述:
* 输入描述:
* 程序输出: 输出结果
*/
#include<iostream>
#include<fstream>
#include<cstdlib>
using namespace std;
int main()
{
int a;
ofstream outfile("f1.dat",ios::out);
if(!outfile)
{
cerr<<"open error!"<<endl;
exit(1);
}
cin>>a;
outfile<<a<<endl;
outfile.close();
return 0;
}
查看文件:
/*copyright(c)2016.烟台大学计算机学院
* All rights reserved,
* 文件名称:text.Cpp
* 作者:吴敬超
* 完成日期:2016年6月13日
* 版本号:codeblock
*
* 问题描述:
* 输入描述:
* 程序输出: 输出结果
*/
#include<iostream>
#include<fstream>
#include<cstdlib>
using namespace std;
int main()
{
int a;
ofstream outfile("f1.dat",ios::out);
if(!outfile)
{
cerr<<"open error!"<<endl;
exit(1);
}
cin>>a;
outfile<<a<<endl;
outfile.close();
return 0;
}
查看文件:
相关文章推荐
- GIT
- 用SpannableString打造绚丽多彩的文本显示效果
- Salesforce 发送业务员未提交任务短信提醒经理
- scrollview与viewpager结合的依赖工程
- LFCS 系列第九讲: 使用 Yum、RPM、Apt、Dpkg、Aptitude 进行 Linux 软件包管理
- 产品设计-产品团队的建设与培养
- 20个常用表达式
- STL的运用—数列
- 【黑马Android】(14)webservice概念/调用/wsdl接口
- python入门简章
- 答卓同学的iOS面试题
- JS设计模式之职责链模式
- 开源框架VTMagic的使用介绍
- ListView应用Demo-使用SimpleAdapter
- TextView 显示html
- 关于链表面试题的一些理解
- PHP总结(一)框架的使用
- Sharing Files
- WPF中的binding(六)- 使用XML数据作为Binding的源
- matlab 窗口布局设置