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

 

jgreenawalt@ccboe.com kjell46andahalf > teensOnly
prev  |  next  |  chance

Given an array of ints return true if every element in the array is a teen. That is, return true if every element is between 13 and 19, inclusive. If the array is empty return false. As soon as one non-teen is found return false.


teensOnly([13, 14, 15, 16, 17, 18, 19]) → true
teensOnly([13, 14, 15, 16, 17, 18, 19, 20]) → false
teensOnly([13, 14, 15, 12, 16, 17, 18, 19]) → false

...Save, Compile, Run (ctrl-enter)

public boolean teensOnly(int [] ages){ }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 200 Post-solution available

Copyright Nick Parlante 2017 - privacy