Answered step by step
Verified Expert Solution
Question
1 Approved Answer
File Name: RandomRange.java Class Name: RandomRange Problem Description: Generate two random numbers between (0-100) If randomNumber 1 is less than randomNumber 2 then print all
File Name: RandomRange.java Class Name: RandomRange Problem Description: Generate two random numbers between (0-100) If randomNumber 1 is less than randomNumber 2 then print all numbers which are divisible by ten between randomNumber1 and randomNumber2 Otherwise, print message "Random Number 1 is greater than Random Number 2" and generate two random numbers again. Stop iterating when you print all values between randomNumber 1 and randomNumber2 which are divisible by ten. (You need to print values between the range of random numbers only once.) Expected Output: Iteration - 1 Random Number 1 = 89 Random Number 2 = 69 Random Number 1 is greater than Random Number 2 Iteration - 2 Random Number 1 = 98 Random Number 2 = 19 Random Number 1 is greater than Random Number 2 Iteration - 3 Random Number 1 = 45 Random Number 2 = 12 Otherwise, print message "Random Number 1 is greater than Random Number 2" and generate two random numbers again. Stop iterating when you print all values between randomNumber1 and randomNumber2 which are divisible by ten. (You need to print values between the range of random numbers only once.) Expected Output: Iteration - 1 Random Number 1 = 89 Random Number 2 = 69 Random Number 1 is greater than Random Number 2 Iteration - 2 Random Number 1 = 98 Random Number 2 = 19 Random Number 1 is greater than Random Number 2 Iteration - 3 Random Number 1 = 45 Random Number 2 = 12 Random Number 1 is greater than Random Number 2 Iteration - 4 Random Number 1 = 16 Random Number 2 = 42 Numbers which are divisible by 10 between ( 16 - 42 ) are: 20 30 40
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started