第16周阅读程序2(1)

来源:互联网 发布:python 兼职 编辑:程序博客网 时间:2024/06/06 04:20
/*  * Copyright(c)2016,烟台大学计算机与控制工程学院  * All rights reserved.  * 文件名称:第16周阅读程序2(1) * 作者:马康泰 * 完成日期:2016.6.15  * 版本号:v1.0  *  * 问题描述:  * 输入描述:  * 程序输出:  */  #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;}

0 0
原创粉丝点击