For some reason, zero1 won't let us use "cout << "hello, " << s;", so we have to use a while loop.
#include <iostream>
using namespace std;
int main() {
string s;
while(cin >> s){
cout << "hello, "<< s << endl;
}
return 0;
}
For some reason, zero1 won't let us use "cout << "hello, " << s;", so we have to use a while loop.
#include
using namespace std;
int main() {
string s;
while(cin >> s){
cout << "hello, "<< s << endl;
}
I know why:
From zero 1 puiching:程式說明:因為系統會賦予數量不一的測試資料來測驗您的程式是否正確,因此必須先以一個 while 迴圈來讀取所有的測試資料。