https://github.com/rahulkeerthi/cracklepop
CracklePop Test
https://github.com/rahulkeerthi/cracklepop
Last synced: about 2 months ago
JSON representation
CracklePop Test
- Host: GitHub
- URL: https://github.com/rahulkeerthi/cracklepop
- Owner: rahulkeerthi
- Created: 2020-05-15T15:11:05.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-15T18:25:35.000Z (about 5 years ago)
- Last Synced: 2025-03-24T11:09:22.694Z (2 months ago)
- Language: Ruby
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## CracklePop
> Write a program that prints out the numbers 1 to 100 (inclusive). If the number is divisible by 3, print Crackle instead of the number. If it's divisible by 5, print Pop. If it's divisible by both 3 and 5, print CracklePop. You can use any language.
My Ruby solution to a CracklePop (FizzBuzz-like) test, in `cracklepop.rb`. File is currently set up to print 1 to 100 when running it directly: `ruby cracklepop.rb` but you can set the `min` and `max` to whatever you like.
TDD spec file also written to accompany this test, in `/spec/cracklepop_spec.rb`.
Run `rspec spec` to see results of the tests.