Guest User

Untitled

a guest
May 20th, 2018
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1. public static int largestAbsVal(int one, int two, int three)
  2. {
  3.     one = Math.abs(one);
  4.     two = Math.abs(two);
  5.     three = Math.abs(three);
  6.    
  7.     if(one>two)
  8.     {
  9.         if(one>three)
  10.         {
  11.             return one;
  12.         }
  13.         if (two>three)
  14.         {
  15.             return two;
  16.         }
  17.     }
  18.     else
  19.     {
  20.         return three;
  21.     }
  22. }
Add Comment
Please, Sign In to add comment