Advertisement
ioanaasdfgh

v63 siruri de caracter

Nov 15th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 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[25],s2[25];
  10.    cin.get(s1,25);
  11.    cin.get();
  12.    cin.get(s2,25);
  13.    cin.get();
  14.   if(strcmp(s1,s2)<0)
  15.        cout<<s1<<" "<<s2;
  16.        else
  17.         cout<<s2<<" "<<s1;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement