Advertisement
Guest User

Untitled

a guest
Apr 21st, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. public int findDifferent (int a, int b, int c) {
  2. return findMax(a,b,c) - findMin(a,b,c);
  3. }
  4.  
  5. public int findMax (int a, int b, int c) {
  6. int result = a>b?a:b;
  7. return result>c?result:c;
  8. }
  9.  
  10. public int findMin (int a, int b, int c) {
  11. int result = a<b?a:b;
  12. return result<c?result:c;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement