#5785: 還是錯了


znrbdcd (李益昌)


#include <iostream>
using namespace std;
main()
{
const int size = 20;
char v[size];
cin.getline(v,20);
cout << v << endl;
system("pause");
return 0;
}
#5830: Re:還是錯了


lfs92002 (GMan每日殺水題1.6449340668482264364...)


#include <iostream>
using namespace std;
int main()  //遺漏"回傳值類型 int"
{
const int size = 20;
char v[size];
while(cin.getline(v,20)) //使用while來完成連續輸入的要求
cout << "hello, "<< v << endl; //也要說個Hello吧?
//system("pause"); // 此行多餘
return 0;