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

 

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

Write a method that counts down, in words, from 'num' down to 1. As a precondition you may assume that 'num' is an integer between 1 and 9 inclusive. This can be done very simply using switch case with no loops!


count(7) → "seven six five four three two one"
count(5) → "five four three two one"
count(4) → "four three two one"

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

public String count(int num) { }

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

Copyright Nick Parlante 2017 - privacy