Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main(void)
- {
- char word[100], s_word[80];
- while(1)
- {
- printf("단어 입력 : ");
- scanf("%s",s_word); //단어 입력
- if(strcmp(s_word,"end")==0) break; //end가 입력되면 while에 나와종료
- strcat(word,s_word); //s_word값을 word에 이어붙침.
- printf("현재까지의 문자열 : %s\n",word); //출력
- strcat(word," "); //뛰어쓰기
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement