Advertisement
Anna3O0

Caractere Fisa 3

Nov 20th, 2020 (edited)
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  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.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement