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

 

norm.krumpe@muohio.edu arraylab1 > onlyEvens
prev  |  next  |  chance

Given an array, return a new array consisting of only the even numbers from the given array.


onlyEvens([1, 2, 3, 4, 5, 2]) → [2, 4, 2]
onlyEvens([0, 16, 8]) → [0, 16, 8]
onlyEvens([1, 3, 5]) → []

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

int[] onlyEvens(int[] nums) { }

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

Copyright Nick Parlante 2017 - privacy