Advertisement
Lisaveta777

Strcpy()

Nov 6th, 2018
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.46 KB | None | 0 0
  1. //Пейстбин
  2. //strcpy(new_word,old_word);
  3.  
  4. #include <stdio.h>
  5. #include <math.h>
  6. #define SIZE 20
  7.  
  8. int main()
  9. {
  10.     char old_word[SIZE],new_word[SIZE];
  11.  
  12.     gets(old_word);
  13.     gets(new_word);
  14.  
  15.    /* do
  16.     {
  17.       old_word[0] = new_word[0];
  18.       gets(new_word);
  19.     }while(old_word[0]==new_word[0]);*/
  20.  
  21.  
  22.  
  23.     while(old_word[0]==new_word[0])
  24.     {
  25.         old_word[0] = new_word[0];
  26.         gets(new_word);
  27.     }
  28.  
  29.     return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement