Advertisement
alex326

Untitled

Jan 22nd, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. problema 447
  2.  
  3. #include <iostream>
  4. using namespace std;
  5. int main()
  6. {
  7. int n;
  8. cin>>n;
  9. if (n%10<n/10%10 && n%10<n/100)
  10. if (n/10%10<n/100)
  11. cout<<n/10%10;
  12. else
  13. cout<<n/100;
  14. if (n/10%10<n%10 && n/10%10<n/100)
  15. if (n%10<n/100)
  16. cout<<n%10;
  17. else
  18. cout<<n/100;
  19. if (n/100<n%10 && n/100<n/10%10)
  20. if (n%10<n/10%10)
  21. cout<<n%10;
  22. else
  23. cout<<n/10%10;
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement