Question: Jump to level 1 Define a method printPowerOf 2 ( ) that takes two double parameters, and outputs Result: followed by the result of
Jump to level
Define a method printPowerOf that takes two double parameters, and outputs "Result: followed by the result of raising the first parameter to the power of the second parameter with a precision of two digits as follows, ending with a newline.
Ex: If the input is then the output is:
Result:
Note:
Recall Math.pow returns to the power of Ex: Math.pow evaluates to
Use system.out.printf myDouble to output doubles with precision of two digits.
import java.util.Scanner;
public class Powerof
Y Your code goes here
public static void mainString args
Scanner scnr new Scanner
System.in;
double ;
double ;
scnrnextDouble;
scnrnextDouble;
printPowerof;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
