write a program to obtain x y z from user and calculate expression : 4x⁴+3y³ +9z+6pi
Answers
Answered by
1
Answer:
import java.util.*;
public class Expression
{
public static void main()
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter x,y,z");
int x=sc.nextInt();
int y=sc.nextInt();
int z=sc.nextInt();
double exp = 4*Math.pow(x,4)+3*Math.pow(y,3)+9*z+3*(3.14)
System.out.println(exp);
}
}
Similar questions