exercism/go/sum-of-multiples/README.md

26 lines
810 B
Markdown
Raw Normal View History

2016-08-13 23:20:14 +00:00
# Sum Of Multiples
Write a program that, given a number, can find the sum of all the multiples of particular numbers up to but not including that number.
If we list all the natural numbers up to but not including 15 that are
multiples of either 3 or 5, we get 3, 5, 6 and 9, 10, and 12.
The sum of these multiples is 45.
Write a program that can find the sum of the multiples of a given set of
numbers.
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://help.exercism.io/getting-started-with-go.html).
## Source
A variation on Problem 1 at Project Euler [view source](http://projecteuler.net/problem=1)