-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDay14.js
More file actions
42 lines (31 loc) · 762 Bytes
/
Day14.js
File metadata and controls
42 lines (31 loc) · 762 Bytes
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
//electricity bill calculator!
// function totalAmount(N) { // N is total units electricity used by the user!
// let total = 80;
// if(0 < N && N < 51)
// {
// total = total + N*3;
// console.log(total);
// }
// else if(50 < N && N < 151)
// {
// let u3 = 50*3;
// N = N-50;
// let u5 = N*5;
// total = total + u3 + u5;
// console.log(total);
// }
// else if(N>150)
// {
// let u3 = 50*3;
// N = N-50;
// let u5 = 100*5;
// N = N-100;
// let u10 = N*10;
// total = total + u3 + u5 +u10;
// console.log(total);
// }
// else
// {
// console.log(total);
// }
// }