Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This actually doesn't work... I put a "/ 3" in at the end of the divisible by 15 if variation. Because of this, every number x divisible by 15 that is input will be off by x in the negative direction. To correct this, the first three if loops could be collapsed into one that says (value % 3 == 0 || value % 5 == 0).
Also, after some testing, it turns out the mathematical solution above is more efficient with larger numbers whereas the solution involving iterating through all of the numbers is faster on smaller numbers.