id/email
password
forgot password
about | help | done | prefs | create account
CodingBat code practice

Java > Warmup-1 > nearHundred
prev  |  next  |  chance

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

...Save, Compile, Run         

See also Java Example Code. Java help docs: If Boolean Logic | Strings | While and For Loops | Arrays and Loops


prev  |  next  |  chance   |  CodingBat  >  Warmup-1

Forget It! -- delete my code for this problem 121.0

Copyright Nick Parlante 2006-10 - privacy