Write the corresponding Java expression for the following mathematical expression
i) p + q / ( r + s)^4
Answers
Answered by
3
import java.util.*;
public class J
{
public static void main (String args[])
{
Scanner sc= new Scanner (System.in);
System.out.println("Please Enter 4 Values");
double p = sc.nextDouble();
double q = sc.nextDouble();
double r = sc.nextDouble();
double s = sc.nextDouble();
double E = p + q / (Math.pow(( r + s ) , 4));
System.out.println(E);
sc.close();
}
}
Java Expression :
p + q / (Math.pow(( r + s ) , 4 ))
Similar questions