Advertisement
ioanaasdfgh

v61 siruri de caractere

Nov 15th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <iostream>
  2. #include <string.h>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.  
  9.    char s1[20];
  10.    char s2[20];
  11.    char s3[20];
  12.    cin.get(s1,20);
  13.    cin.get();
  14.    cin.get(s2,20);
  15.    cin.get();
  16.    cin.get(s3,20);
  17.    cin.get();
  18.    if (strlen(s1)< strlen(s2))
  19.     strcat(s3,s1);
  20.    else strcat(s3,s2);
  21.  
  22.    cout<<s1<<" "<<s2<<" "<<s3;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement