Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static int largestAbsVal(int one, int two, int three)
- {
- one = Math.abs(one);
- two = Math.abs(two);
- three = Math.abs(three);
- if(one>two)
- {
- if(one>three)
- {
- return one;
- }
- return three;
- }
- if(two>one)
- {
- if(two>three)
- {
- return two;
- }
- return three;
- }
- if(three>one)
- {
- if(three>two)
- {
- return three;
- }
- return two;
- }
- return one;
- }
Add Comment
Please, Sign In to add comment