Question: Given 2 int values, return whichever value is nearest to the value 10, or return 0 in the event of a tie. Note that

Given 2 int values, return whichever value is nearest to the value 10, or return 0 in the event of a tie. Note that Math.abs(n) returns the absolute value of a number. close10(8, 13) 8 close10(13,8) 8 close10(13,7) 0 public static int close10(int a, int b) { }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
