Question: Create a MyPow application that uses the formula elex) to calculate X. The MyPow application should prompt the user for two numbers and then
Create a MyPow application that uses the formula elex) to calculate X. The MyPow application should prompt the user for two numbers and then display the result from the formula and, for com- parison, show the same result using the Math pow() method. The application should display output similar to: Enter a value for X: 7 Enter a value for Y: 5 The result fron using the formula is: 16806.99999999998 The result from using the Math pou() method is: 16497.8 The Math library provides methods for calculating base 10 and base e (natural) logarithms. The exp() method raises e to a given power: Class Math (java.lang.Math) Methods log(double num) log10 (double num) exp (double num) E returns the natural logarithm of num. returns the base 10 logarithm of num. returns e raised to the power of num.
Step by Step Solution
There are 3 Steps involved in it
Below is a simple Java console application called MyPow that calculates the value of eX using both t... View full answer
Get step-by-step solutions from verified subject matter experts
