#8871: C++題目不知道為何NA


samson1016 (none)


執行結果

小弟不懂為什麼會NA........

以下是程式碼 

#include<iostream>

#include<cstdlib>

using namespace std;

 

int main()

{

    string a,b,c;

 

    string h = "hello, ";

 

    cin >> a;

    cin >>b;

    cin >> c;

 

 

 

 

    cout << h << a << endl;

    cout << h << b << endl;

    cout << h << c << endl;

}

 請熱心的大大幫忙一下.......我是無辜的

#8872: Re:C++題目不知道為何NA


samson1016 (none)


抱歉我剛剛沒有注意到範例

 

應該要用 while才對

 

而不是很直接的輸入三次輸出三次= =