问题 填空题

[说明] 编写程序,把从键盘上输入的一批整数(以-1作为终止输入的标志)保存到文本文件“a: xxk1. dat”中。
(1)
# include <fstream. h >
# include < stdlib. h >
void main ( )
(2)
if ( ! four)
cerr < <“文件没有找开!” < <end1;
exit (1);

int x;
cin > >x;
while( (3) )
(4)
cin> >x;

(5)

答案

参考答案:# include < iostream. h >
ofstream four(" a: xxkA, dat" );
x! = -A
fout < fout. close( );

多项选择题
单项选择题 B型题