Advertisement
a53

nrSumCifMax

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