Anna3O0

3.11.2020 Scoala Caractere Fisa 3

Nov 20th, 2020 (edited)
127
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <string.h>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     char s[21],s1[21],aux[21];
  9.     cin>>s>>s1;
  10.     if(strcmp(s,s1)>0)
  11.     {
  12.         strcpy(aux,s);
  13.         strcpy(s,s1);
  14.         strcpy(s1,aux);
  15.     }
  16.     cout<<s<<" "<<s1;
  17.     return 0;
  18. }
  19.  
RAW Paste Data