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



Given start and end numbers, return a new array of Strings containing the sequence of integers from start up to but not including last where the word "odd" replaces every odd number, so start=5 and last=10 yields {"odd", "6", "odd", "8", "odd"}. If there is nothing in the array, return null. (See also: FizzBuzz Code)

fizzOdds(5, 10) → ["odd", "6", "odd", "8", "odd"]
fizzOdds(11, 18) → ["odd", "12", "odd", "14", "odd", "16", "odd"]
fizzOdds(2, 5) → ["2", "odd", "4"]

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

public String[] fizzOdds(int start, int last){ }

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