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

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

We'll say that a number is "teen" if it is in the range 13..19 inclusive. Given 2 int values, return true if one or the other is teen, but not both.

loneTeen(13, 99) → true
loneTeen(21, 19) → true
loneTeen(13, 13) → 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 157.0

Copyright Nick Parlante 2006-10 - privacy