Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int a, b, c, smaxim;
  6.  
  7. int main () {
  8. cin>>a>>b>>c;
  9. smaxim = a%10+a/10;
  10. if (b%10+b/10 > smaxim)
  11. smaxim = b%10+b/10;
  12. if (c%10+c/10 > smaxim)
  13. smaxim = c%10+c/10;
  14.  
  15. if (smaxim == a/10 + a%10)
  16. cout<<a<<" ";
  17. if (smaxim == b/10 + b%10)
  18. cout<<b<<" ";
  19. if (smaxim == c/10 + c%10)
  20. cout<<c<<" ";
  21.  
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement