-
Notifications
You must be signed in to change notification settings - Fork 333
/
Copy pathnumbers.js
68 lines (57 loc) · 870 Bytes
/
numbers.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
function add (a, b) {
return a+b;
// your code here
}
function subtract (a, b) {
return a-b;
// your code here
}
function multiply (a, b) {
return a*b;
// your code here
}
function divide (a, b) {
return a/b;
// your code here
}
function power (a, b) {
return a**b;
// your code here
}
function round (a) {
return Math.round(a);
// your code here
}
function roundUp (a) {
return Math.ceil(a);
// your code here
}
function roundDown (a) {
return Math.floor(a);
// your code here
}
function absolute (a) {
return Math.abs(a);
// your code here
}
function quotient (a, b) {
return Math.trunc(a/b);
// your code here
}
function remainder (a, b) {
return a%b;
// your code here
}
module.exports = {
add,
subtract,
multiply,
divide,
power,
round,
roundUp,
roundDown,
absolute,
quotient,
remainder
}