In Java write an assignment statement that takes the fifth p

In Java, write an assignment statement that takes the fifth power of the absolute value of the product of double1 and double2 and assigns it to an integer called int1

use casting.

Solution

Answer: int int1 = (int) Math.pow(Math.abs(double1 * double2), 5);

double1 * double2 indicates product

Math.abs(double1 * double2) indicates the absolute value of the product of double1 and double2

Math.pow(Math.abs(double1 * double2), 5) indictaes the fifth power of the absolute value of the product of double1 and double2

In Java, write an assignment statement that takes the fifth power of the absolute value of the product of double1 and double2 and assigns it to an integer calle

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site