Java is the future !: nearHundred

Saturday, October 9, 2010

nearHundred

Given an int n, return true if it is within 10 of 100 or 200. Note: Math.abs(num) computes the absolute value of a number.

nearHundred(93) → true
nearHundred(90) → true
nearHundred(89) → false

Solution :

No comments:

Post a Comment