Skip to content

Commit 4056f75

Browse files
committed
Added a new problem
1 parent 0849cc9 commit 4056f75

File tree

3 files changed

+34
-1
lines changed

3 files changed

+34
-1
lines changed

L-B/0016 AreaOfTriangle/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Problem 15 (L-B) ~ Area Of Triangle
1+
# Problem 16 (L-B) ~ Area Of Triangle
22

33
## Problem
44

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Problem 17 (L-B) ~ Generate Random Number
2+
3+
## Problem
4+
5+
This program generates a random number between minimum and maximum value.
6+
7+
## Solution
8+
9+
```javascript
10+
let min = 0;
11+
let max = 10;
12+
13+
console.log(Math.floor(Math.random() * (max - min + 1)) + min);
14+
```
15+
16+
## References
17+
18+
- [freeCodeCamp](https://www.freecodecamp.org/news/javascript-random-number-how-to-generate-a-random-number-in-js/)
19+
20+
## Problem Added By
21+
22+
- [GitHub](https://github.com/Shiva-Sai-ssb)
23+
24+
## Contributing
25+
26+
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
27+
28+
Please make sure to update tests as appropriate.
29+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
let min = 0;
2+
let max = 10;
3+
4+
console.log(Math.floor(Math.random() * (max - min + 1)) + min);

0 commit comments

Comments
 (0)