about | help | code help+videos | done | prefs |
Spring Break is a time when it seems that everything is on break and many things are backwards of what they normally are. For that reason, we will write a method that takes an integer as an input parameter, then outputs a string with the integer's digits in reverse order with a "-" inserted as a break between each digit. Look at the test data for examples. Note that the integer parameter will be positive, but could be a single digit. SpringBreakInTheNumber(13245) → "5-4-2-3-1" SpringBreakInTheNumber(13214) → "4-1-2-3-1" SpringBreakInTheNumber(5) → "5" ...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: 250
Copyright Nick Parlante 2017 - privacy