# 哈囉 https://zerojudge.tw/ShowProblem?problemid=a001 ### 內容 學習所有程式語言的第一個練習題 請寫一個程式,可以讀入指定的字串,並且輸出指定的字串 比如:輸入字串 "world", 則請輸出 "hello, world" ### 輸入說明 輸入總共一行,內含一組文字 ### 輸出說明 輸出題目指定的文字 ### 範例輸入輸出 #### 範例輸入 1 ``` world ``` #### 範例輸出 1 ``` hello, world ``` #### 範例輸入 2 ``` C++ ``` #### 範例輸出 2 ``` hello, C++ ``` #### 範例輸入 3 ``` Taiwan ``` #### 範例輸出 3 ``` hello, Taiwan ``` # Code ```cpp #include <iostream> using namespace std; int main(){ string s; cin >> s; cout << "hello, " + s << endl; return 0; } ``` ```c #include<stdio.h> int main(){ char s[50]; while(scanf("%s", s) != EOF) { printf("hello, %s\n", s); } return 0; } ``` ###### tags: `基本輸入輸出` `IO`