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-

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

1 Expert Approved Answer
Step: 1 Unlock

Heres a Java program that meets the specified requirements using a dowhile loop import javautilRando... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!