nearHundred

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

nearHundred(93) -> true
nearHundred(90) -> true
nearHundred(89) ->false

public boolean nearHundred(int n)

Rate this:

Share this:

Like Loading.

Related

Published by Sunil Kumar

I'm working as Project Lead in Oracle. I'm mainly into Microsoft technologies but quite interested in Java and C. I'm not a professional blogger, whatever I find interesting I read it and write a blog post just to share my understanding. View all posts by Sunil Kumar

Published January 11, 2010

Leave a comment Cancel reply

Recent Posts

Categories