From 509c5063d66e8bbef4ec1def1c99c318be51aceb Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Thu, 25 Aug 2016 03:13:39 +0200 Subject: Initial import --- go/raindrops/README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 go/raindrops/README.md (limited to 'go/raindrops/README.md') diff --git a/go/raindrops/README.md b/go/raindrops/README.md new file mode 100644 index 0000000..7cd1285 --- /dev/null +++ b/go/raindrops/README.md @@ -0,0 +1,37 @@ +# Raindrops + +Write a program that converts a number to a string, the contents of which depends on the number's factors. + +- If the number contains 3 as a factor, output 'Pling'. +- If the number contains 5 as a factor, output 'Plang'. +- If the number contains 7 as a factor, output 'Plong'. +- If the number does not contain 3, 5, or 7 as a factor, + just pass the number's digits straight through. + +## Examples + +- 28's prime-factorization is 2, 2, 7. + - In raindrop-speak, this would be a simple "Plong". +- 1755 prime-factorization is 3, 3, 3, 5, 13. + - In raindrop-speak, this would be a "PlingPlang". +- The prime factors of 34 are 2 and 17. + - Raindrop-speak doesn't know what to make of that, + so it just goes with the straightforward "34". + +To run the tests simply run the command `go test` in the exercise directory. + +If the test suite contains benchmarks, you can run these with the `-bench` +flag: + + go test -bench . + +For more detailed info about the Go track see the [help +page](http://exercism.io/languages/go). + +## Source + +A variation on a famous interview question intended to weed out potential candidates. [http://jumpstartlab.com](http://jumpstartlab.com) + +## Submitting Incomplete Problems +It's possible to submit an incomplete solution so you can see how others have completed the exercise. + -- cgit v1.2.3