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

 

countUpDown


When a is less than or equal to b, return a string that concatenates the digits from a up to b, then from b down to a. When a is greater than b return a string that concatenates a and b.


countUpDown(1, 5) → "1234554321"
countUpDown(5, 1) → "51"
countUpDown(3, 5) → "345543"

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

public String countUpDown(int a, int b) { }

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 Post-solution available

Copyright Nick Parlante 2017 - privacy