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

 

abraskin@mbusd.org > defuseCount
prev  |  next  |  chance

THE BOMB IS ABOUT TO GO OFF!
It is your job as the lowest ranking officer in the IED squad to count down how much time is left before the explosive goes off.
Integer n is the amount of seconds left before the bomb goes off. n will always be greater than 0.
Your squad always manages to defuse the bomb with 1 second to go.
Return a String with your countdown.
*Remember to use recursion to solve the problem*

defuseCount(5) → "5-4-3-2-1"
defuseCount(7) → "7-6-5-4-3-2-1"
defuseCount(1) → "1"

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

public String defuseCount(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: 100

Copyright Nick Parlante 2017 - privacy