An open API service indexing awesome lists of open source software.

https://github.com/tedlivist/series_sum


https://github.com/tedlivist/series_sum

Last synced: 11 months ago
JSON representation

Awesome Lists containing this project

README

          

## This is my solution to a challenge on codewars.com using RUBY

## The challenges is titled:
## Sum of the first nth term of Series

# Rules:
## You need to round the answer to 2 decimal places and return it as String.

## If the given value is 0 then it should return 0.00

## You will only be given Natural Numbers as arguments.

# Examples:
## SeriesSum(1) => 1 = "1.00"
## SeriesSum(2) => 1 + 1/4 = "1.25"
## SeriesSum(5) => 1 + 1/4 + 1/7 + 1/10 + 1/13 = "1.57"