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

 

orion.a.smith@gmail.com apcsa-loops > apcsaLoopsConcatInclusiveNsAscending
prev  |  next  |  chance

Given three numbers a, b and n, build a String that contains every nth (divisible by n) number from a to b, inclusive. Precondition: a < b for all inputs, n > 0.


apcsaLoopsConcatInclusiveNsAscending(3, 5, 2) → "4"
apcsaLoopsConcatInclusiveNsAscending(3, 10, 2) → "46810"
apcsaLoopsConcatInclusiveNsAscending(2, 4, 1) → "234"

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

public String apcsaLoopsConcatInclusiveNsAscending(int a, int b, int n) { }

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: 150

Copyright Nick Parlante 2017 - privacy