- Compute Z Y X Ex If The Input Is 4 0 2 0 Then The Output Is 4 0 1 Import Java Util Scanner 2 3 Public Class M 1 (55.52 KiB) Viewed 38 times
Compute: z = y³ - x| Ex: If the input is 4.0 2.0, then the output is: 4.0 1 import java.util.Scanner; 2 3 public class M
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Compute: z = y³ - x| Ex: If the input is 4.0 2.0, then the output is: 4.0 1 import java.util.Scanner; 2 3 public class M
Compute: z = y³ - x| Ex: If the input is 4.0 2.0, then the output is: 4.0 1 import java.util.Scanner; 2 3 public class MathFunctions { 4 public static void main (String [] args) { Scanner scnr = new Scanner(System.in); 5 double x; double y; double z; x= scnr.nextDouble(); y scnr.nextDouble(); z Math.pow(x, Math.pow(3.0) - x);/ Your code goes here / System.out.printf("%.1f\n", z); // This will output z with 1 decimal place. } 7 8 9 10 11 12 13 14 15 16 17.1