Guest User

Untitled

a guest
Feb 25th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include <string.h>
  2. #include <iostream>
  3. #include <locale>
  4.  
  5. using namespace std;
  6.  
  7. void main() {
  8.  
  9. setlocale(LC_ALL,"Russian");
  10. char s[50], s1[50];
  11. char* ps = s;
  12. char* ps1 = s1;
  13. cout<<"Введите строку 1."<<endl;
  14. cin.getline(s,25);
  15. cout<<"Введите строку 2."<<endl;
  16. cin.getline(s1,25);
  17. while(*ps++);
  18. ps--;
  19. while(*ps++=*ps1++);
  20. cout<<"Скопированная строка."<<endl;
  21. cout<<s<<endl;
  22.  
  23. system("pause");
  24. }
Add Comment
Please, Sign In to add comment