Problem Description
學習所有程式語言的第一個練習題 請寫一個程式,可以讀入指定的字串,並且輸出指定的字串。
Input Format
指定的文字
Output Format
輸出指定的文字
Sample Input
world C++ mary
Sample Output
hello, world hello, C++ hello, mary
-----*Problem from【ZeroJudge, An Online Judge System For Beginners】
My Answer
| 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. | #include<iostream> using namespace std; int main(void) { string s; while(cin>>s){ cout<<"hello, "<<s<<endl; } return 0; } |
文章標籤
全站熱搜
