Guest User

Untitled

a guest
Nov 14th, 2019
103
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int n,b;
  5. scanf("%d",&n);
  6. if(n/100+n%10==n%100/10) b=n%100/10;
  7. else
  8. if(n%100/10+n%10==n/100) b=n/100;
  9. else
  10. if(n%100/10+n/100==n%10) b=n%10;
  11. else
  12. if(n/100+n%10<=n%100/10) b=n/100+n%10;
  13. else
  14. if(n%100/10+n%10<=n/100) b=n%100/10+n%10;
  15. else
  16. if(n%100/10+n/100<=n%10) b=n%100/10+n/100;
  17. printf("%d",b);
  18. return 0;
  19. }
RAW Paste Data