Write a program in Java to calculate and display the value of the given expression:
1/x3 + 2/y4 + 3/z5
Take the Value of x, y and z as inputs.
plz answer this correctly..
the correct answer will be marked as brainliest.
Answers
Answered by
1
Answer:
import java.util.*;
class answer{
public static void main (){
Scanner in = new Scanner(System.in);
System.out.println("Enter the value of x, y and z");
int x= in.nextInt();
int y= in.nextInt();
int z= in.nextInt();
double result= 1/x*3 + 2/y*4 + 3/z*5;
System.out.println(result);
}
}
Answered by
0
Answer:
(Math.pow(x,3)+Math.pow(y,4))/(Math.pow(z,5))
Explanation:
Similar questions