about | help | code help+videos | done | prefs |
apcsaLoopsConcatInclusiveAscendingWithSpaces
Given two numbers a and b, build a String that contains every number from a to b, inclusive. But now, in between each pair of element, add a space " " character. Precondition: a < b for all inputs. HINT: use an if statement to determine when you should add a space.apcsaLoopsConcatInclusiveAscendingWithSpaces(1, 2) → "1 2" apcsaLoopsConcatInclusiveAscendingWithSpaces(3, 5) → "3 4 5" apcsaLoopsConcatInclusiveAscendingWithSpaces(1, 8) → "1 2 3 4 5 6 7 8" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 220
Copyright Nick Parlante 2017 - privacy