Question:medium

Write a JavaScript program that uses Math.random() to generate three random numbers greater than 10 and less than 100. The program should also display the sum of the numbers, the largest number, and the smallest number.
Note: Use built-in JavaScript functions wherever needed.

Show Hint

To test the boundary conditions of this scaling formula: - If Math.random() yields $0$: $0 \times 89 + 11 = 11$ (satisfies $> 10$). - If Math.random() yields $0.999$: $0.999 \times 89 + 11 = 88.91 + 11 = 99.91 \rightarrow \lfloor 99.91 \rfloor = 99$ (satisfies $< 100$).
Updated On: Jun 29, 2026
Show Solution

Solution and Explanation

Was this answer helpful?
0