A student in correctly attempted to produce random value in the range 1.6 using the expression.
6* ( int ) Math.random ( ) + 1
Correct the error in expression above to get the desired result.
Please answer only if you know.
No spams please.......
Otherwise I have to report the answer
Answers
Answered by
1
Explanation:
The expression
6* ( int ) Math.random ( ) + 1. 6
Will always give the output 1.6
The expression
1+Math.random()*0.5
Will give output between 1.0 to 1.6
The expression
6-Math.random()*5
Will give output between 1 and 6
Similar questions
English,
3 months ago
English,
3 months ago
Math,
6 months ago
India Languages,
10 months ago
Environmental Sciences,
10 months ago
Science,
10 months ago