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

Java > Warmup-2 > arrayFront9
prev  |  next  |  chance

Given an array of ints, return true if one of the first 4 elements in the array is a 9. The array length may be less than 4.

arrayFront9({1, 2, 9, 3, 4}) → true
arrayFront9({1, 2, 3, 4, 9}) → false
arrayFront9({1, 2, 3, 4, 5}) → 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-2

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

Copyright Nick Parlante 2006-10 - privacy