| 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 numbers, add a space " " character. (The difference between this problem and the previous one is that there should NOT be a space at the end.) Precondition: a < b for all inputs. HINT: use an if statement to determine when you should add a space. Or, (more creative) use a substring after the loop.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