Skip to content

Commit 666e2f4

Browse files
committed
Added q1: multiples question
1 parent e3edc29 commit 666e2f4

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

2013-02-03-assignment.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,28 @@ Again, please feel free to post questions on [github Issues page][issues] for th
88

99
## Q1: Multiples of 3 and 5
1010

11+
Find the sum of all positive multiples of 3 or 5 below a specified number (`limit`).
12+
13+
```javascript
14+
function multiples(limit) {
15+
// ...
16+
}
17+
```
18+
19+
Example Tests:
20+
21+
```javascript
22+
multiples(1) // 0
23+
multiples(10) // 23
24+
multiples(16) // 60
25+
```
26+
1127
### Hint
1228

29+
Numbers that are both multiples of 3 and 5 should only be counted once. For example, **15** should only be counted as once.
30+
31+
Note that `limit` is **non-inclusive**, so if the limit was `15`, the list of numbers we would be interested in are `[3, 5, 6, 9]`.
32+
1333
---
1434

1535
## Q2: Implement Map

assignments/q1-multiples.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
function multiples(limit) {
2+
// ...
3+
}

0 commit comments

Comments
 (0)