https://github.com/tedlivist/series_sum
https://github.com/tedlivist/series_sum
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tedlivist/series_sum
- Owner: TedLivist
- Created: 2020-10-29T22:52:23.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-29T23:17:05.000Z (over 5 years ago)
- Last Synced: 2025-07-11T11:58:45.395Z (12 months ago)
- Language: Ruby
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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"