[Login|Register]
New post

Show post

Search forum

Read topic
有些问题? 2010-10-11 02:34:11 zsonglin
#include <iostream>

using namespace std;
int main()
{
for(char c;c!=EOF;)    
{
   if((c=cin.get())!='\n')
      cout.put(c);
   else
      cout<<endl;
}
    
}
Re:有些问题? 2010-10-11 16:59:54 mrhead
use !cin.eof() instead of c!=EOF
and try again.
Reply
Title
Message
(64K)
University of Science and Technology of China
Online Judge for ACM/ICPC
Processed in 1.4ms with 1 query(s).