#678: 如何空一格


spider458 (beginer)


  這是不材小弟我的程式,他說要空一格,我測試過後有空一格啊,可是他不讓我過,請會的人教我如何空一格。

#include <iostream>
#include <string>
#include <ctype.h>
using namespace std;

int main()
{
 string s;
 while(cin >> s){
     cout << "Hello" <<'\t'<< s << endl;
            }
 return 0;
  
}

#681: Re:如何空一格


NOIP2008 (被爱惯坏)


  這是不材小弟我的程式,他說要空一格,我測試過後有空一格啊,可是他不讓我過,請會的人教我如何空一格。

#include <iostream>#include <string>#include <ctype.h>using namespace std;

int main(){ string s; while(cin >> s){     cout << "Hello" <<'\t'<< s << endl;            } return 0;   }

 

 

"Hello "  看到了嘛?

    在字符串中直接空出来就可以了