7 kyu

Insert dashes

5,086 of 9,133joh_pot

Description:

Write a function that takes an integer num (num >= 0) and inserts dashes ('-') between each two odd digits in num.

Examples

454793 ---> "4547-9-3"
     0 ---> "0"
     1 ---> "1"
13579  ---> "1-3-5-7-9"
 86420 ---> "86420"
Strings
Arrays
Fundamentals

Stats:

CreatedJul 3, 2015
PublishedJul 3, 2015
Warriors Trained15027
Total Skips917
Total Code Submissions27625
Total Times Completed9133
JavaScript Completions5086
CoffeeScript Completions35
Python Completions2390
Ruby Completions578
C# Completions385
Java Completions826
C Completions65
COBOL Completions3
Total Stars181
% of votes with a positive feedback rating93% of 1086
Total "Very Satisfied" Votes942
Total "Somewhat Satisfied" Votes127
Total "Not Satisfied" Votes17
Ad
Contributors
  • joh_pot Avatar
  • g964 Avatar
  • GiacomoSorbi Avatar
  • MMMAAANNN Avatar
  • joecastle Avatar
  • dinglemouse Avatar
  • Souzooka Avatar
  • FArekkusu Avatar
  • hobovsky Avatar
  • trashy_incel Avatar
  • user8436785 Avatar
  • ejini战神 Avatar
  • akar-0 Avatar
  • yLaWy Avatar
Ad