Question: Write a java program with following specifications: 1. It should generate 4 random numbers in the range [40- 100] 2. Sum of these random
Write a java program with following specifications: 1. It should generate 4 random numbers in the range [40- 100] 2. Sum of these random numbers should be less than 200 3. This sum should be divisible by 5 4. As you may not get it in one run, use sentinel value type do-while loop to achieve this. 5. Prints the number of iterations (times loop has to run) taken by program to print the result
Step by Step Solution
There are 3 Steps involved in it
Heres a Java program that meets the specified requirements using a dowhile loop import javautilRando... View full answer
Get step-by-step solutions from verified subject matter experts
