In Java
Given three floating-point numbers x, y, and z, output x to the power of z, x to the power of (y to the power of z), the absolute value of y, and the square root of (xy to the power of z).
Ex: If the input is:
3.6 4.5 2.0
the output is:
12.96 1.841304610218211E11 4.5 16.2
I have provide the code with proper comments and proper indentation and also shared the screenshots for proper indentation.
CODE:
//importing the modules
//Here I have used the
//Math module from the util
import java.lang.*;
import java.util.*;
public class Main{
public static void main(String[] args){
//declaring the
varibles
double x,y,z;
//initializing the
scanner to take the input
Scanner s = new
Scanner(System.in);
//taking the
inputs
x =
s.nextDouble();
y =
s.nextDouble();
z =
s.nextDouble();
//calculating the
results
double result1 =
Math.pow(x, z);
//(x^y)^z
double result2 =
Math.pow(x,Math.pow(y, z));
//sqrt((x*y)^z)
double result3 =
Math.pow(Math.pow(x*y, z),0.5);
//printing the
results
System.out.println(result1 + " " + result2 + " " + y + " " +
result3);
}
}
//You can compile the code using "javac Main.java" command and run the same using "java Main" command.
Screenshots:

Output:

HAPPY CODING!
In Java Given three floating-point numbers x, y, and z, output x to the power of...