Question: Generate a Java application that prompts the user for an int and a double and then uses Math class methods to display each of the

Generate a Java application that prompts the user for an int and a double and then uses Math class methods to display each of the following:

a. The square root of the int

b. A random number between 0 and the int (Hint: The Math.random ( ) method returns a value between 0 and 1 .For example, if the int is 10, you want a number that is 10 times larger than the value returned.)

c. The value of the floor, ceiling, and round of the double

d. The larger and the smaller of the int and the double

save the application as MathTest.java

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 Algorithms Questions!