MUstar

IoT C언어 0710 - EX12_2

Jul 15th, 2017
81
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(void)
  5. {
  6.     char  word[100], s_word[80];
  7.     while(1)
  8.     {
  9.         printf("단어 입력 : ");
  10.         scanf("%s",s_word);         //단어 입력
  11.         if(strcmp(s_word,"end")==0) break;  //end가 입력되면 while에 나와종료
  12.         strcat(word,s_word);            //s_word값을 word에 이어붙침.
  13.         printf("현재까지의 문자열 : %s\n",word); //출력
  14.         strcat(word," ");           //뛰어쓰기
  15.     }
  16.  
  17.     return 0;
  18. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×