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

 

jebbert@volusia.k12.fl.us > quiz02_20_2017_digitSpread_APSLHL
prev  |  next  |  chance

Write a method that accepts a positive integer num and a string str, then returns a string representing num, but with str inserted BETWEEN each digit. Note that str will NOT be inserted before the first digit or after the last digit. Look at the test data for examples.


quiz02_20_2017_digitSpread_APSLHL(456, " ") → "4 5 6"
quiz02_20_2017_digitSpread_APSLHL(7813, "^") → "7^8^1^3"
quiz02_20_2017_digitSpread_APSLHL(47820, "xyz") → "4xyz7xyz8xyz2xyz0"

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

public String quiz02_20_2017_digitSpread_APSLHL(int num, String str) { }

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

Copyright Nick Parlante 2017 - privacy