#11319: 多一個空格


heaven23 (heaven23)


我在自己的電腦上測試都沒問題,但是在這上面卻會多一個空格,請各位高手幫我看一下

#include <cstdlib>
#include <iostream>
using namespace std;

int main(int argc, char *argv[])
{ string s;
while(cin>>s)
{cout<<"hello,"<<s<<endl;}
system("PAUSE");
return 0;
}

正確答案hello,world

輸出答案hello, world

#11320: Re:多一個空格


heaven23 (heaven23)


我在自己的電腦上測試都沒問題,但是在這上面卻會多一個空格,請各位高手幫我看一下

#include
#include
using namespace std;

int main(int argc, char *argv[])
{ string s;
while(cin>>s)
{cout<<"hello,"<<s<<endl;}
system("PAUSE");
return 0;
}

正確答案hello,world

輸出答案hello, world

sorry 是我看錯了抱歉