/*
*Copyright(c)2016,烟台大学计算机与控制工程学院
*All right reserved.
*文件名称:123.cpp
*作 者:王蕊
*完成日期:2016年6月16日
*版 本 号: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;
}
运行结果: