6 kyu
Next Version
968 of 2,088AzariasB
Description:
You're fed up about changing the version of your software manually. Instead, you will create a little script that will make it for you.
Exercice
Create a function nextVersion
, that will take a string in parameter, and will return a string containing the next version number.
For example:
Current -> Next version
"1.2.3" -> "1.2.4"
"0.9.9" -> "1.0.0"
"1" -> "2"
"1.2.3.4.5.6.7.8" -> "1.2.3.4.5.6.7.9"
"9.9" -> "10.0"
Rules
All numbers, except the first one, must be lower than 10: if there are, you have to set them to 0 and increment the next number in sequence.
You can assume all tests inputs to be valid.
Arrays
Strings
Algorithms
Similar Kata:
Stats:
Created | Feb 14, 2016 |
Published | Feb 14, 2016 |
Warriors Trained | 3755 |
Total Skips | 105 |
Total Code Submissions | 14769 |
Total Times Completed | 2088 |
JavaScript Completions | 968 |
Python Completions | 797 |
Ruby Completions | 180 |
CoffeeScript Completions | 13 |
Haskell Completions | 31 |
TypeScript Completions | 99 |
Lua Completions | 79 |
Total Stars | 83 |
% of votes with a positive feedback rating | 94% of 383 |
Total "Very Satisfied" Votes | 342 |
Total "Somewhat Satisfied" Votes | 36 |
Total "Not Satisfied" Votes | 5 |