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

 

AP-1 > copyEvens
prev  |  next  |  chance

Given an array of positive ints, return a new array of length "count" containing the first even numbers from the original array. The original array will contain at least "count" even numbers.

copyEvens([3, 2, 4, 5, 8], 2) → [2, 4]
copyEvens([3, 2, 4, 5, 8], 3) → [2, 4, 8]
copyEvens([6, 1, 2, 4, 5, 8], 3) → [6, 2, 4]

...Save, Compile, Run

public int[] copyEvens(int[] nums, int count) { }


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: 230.0

Copyright Nick Parlante 2016 - privacy