Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sjdev2212/mob-18-3
https://github.com/sjdev2212/mob-18-3
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/sjdev2212/mob-18-3
- Owner: sjdev2212
- Created: 2022-03-18T18:39:51.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-18T18:42:37.000Z (almost 3 years ago)
- Last Synced: 2024-11-09T04:33:01.974Z (about 2 months ago)
- Language: Ruby
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mob-18-3
Your task is to make function, which returns the sum of a sequence of integers.
The sequence is defined by 3 non-negative values: begin, end, step (inclusive).
If begin value is greater than the end, function should returns 0
Examples
2,2,2 --> 2
2,6,2 --> 12 (2 + 4 + 6)
1,5,1 --> 15 (1 + 2 + 3 + 4 + 5)
1,5,3 --> 5 (1 + 4)