Question: Write a program in java that randomly generates two random integers, one between 100 and 1000, and the second one between 10 and 100, and

Write a program in java that randomly generates two random integers, one between 100 and 1000, and the second one between 10 and 100, and display the whole number and three significant digits after the decimal point of dividing the first random number by the second one.

Your program should read an integer from the user to set the seed.

Sample run 1:

Enter seed value: 150

The first random number: 531

The second random number: 79

Dividing 531 by 79

Whole number: 6

Three significant digits after decimal point: 721

Sample run 2:

Enter seed value: 0

The first random number: 160

The second random number: 98

Dividing 160 by 98

Whole number: 1

Three significant digits after decimal point: 632

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!