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

 

tmhscs@gmail.com arrays > array_fivesToZeroes
prev  |  next  |  chance

Given an integer array "a", return the array but with all of the values of 5 changed to 0.


array_fivesToZeroes([3, 4, 5]) → [3, 4, 0]
array_fivesToZeroes([5, 1, 2]) → [0, 1, 2]
array_fivesToZeroes([1, 2, 3, 4, 5]) → [1, 2, 3, 4, 0]

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

public int[] array_fivesToZeroes(int[] a) { }

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

Post-solution available

Copyright Nick Parlante 2017 - privacy