Which of the following statements assigns a random integer between 25 and 60, inclusive, to rn? int rn = (int) (Math.random() * 25) + 36; int rn = (int) (Math.random() * 25) + 60; int rn = (int) (Math.random() * 26) + 60; int rn = (int) (Math.random() * 36) + 25; int rn = (int) (Math.random() * 60) + 25;
Which of the following statements assigns a random integer between 25 and 60, inclusive, to rn? int rn = (int) (Math.random() * 25) + 36; int rn = (int) (Math.random() * 25) + 60; int rn = (int) (Math.random() * 26) + 60; int rn = (int) (Math.random() * 36) + 25; int rn = (int) (Math.random() * 60) + 25;
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 10PE
Related questions
Question
![Question 31
Which of the following statements assigns a random integer between 25 and 60,
inclusive, to rn?
int rn = (int) (Math.random() * 25) + 36;
int rn = (int) (Math.random() * 25) + 60;
int rn = (int) (Math.random() * 26) + 60;
int rn = (int) (Math.random() * 36) + 25;
int rn = (int) (Math.random() * 60) + 25;](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F6a70e2d2-d641-435a-b212-d4266cff05fc%2Fdb6538e8-715e-4b42-9ed7-cfa0eb03b95f%2Fc9ff3jl_processed.png&w=3840&q=75)
Transcribed Image Text:Question 31
Which of the following statements assigns a random integer between 25 and 60,
inclusive, to rn?
int rn = (int) (Math.random() * 25) + 36;
int rn = (int) (Math.random() * 25) + 60;
int rn = (int) (Math.random() * 26) + 60;
int rn = (int) (Math.random() * 36) + 25;
int rn = (int) (Math.random() * 60) + 25;
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)