請寫一個程式,可以讀入指定的字串,並且輸出指定的字串。
輸入說明 :
指定的文字
輸出說明 :
輸出指定的文字
範例輸入 :
world
C++
mary
範例輸出 :
hello, world
hello, C++
hello, mary
程式碼:
#include<stdio.h>
int main()
{
char s[100];
while(scanf("%s",s)==1)
printf("hello, %s\n",s);
return 0;
}http://zerojudge.tw/ShowProblem?problemid=a001
沒有留言:
張貼留言