What is the appropriate code using the existing code provided?Thank you.
CHALLENGE 6.1.3: Method definition: Volume of a pyramid. ACTIVITY Define a method pyramidVolume with double data type parameters baseLength, baseWidth, and pyramid Height, that returns as a double the volume of a pyramid with a rectangular base. Relevant geometry equations: Volume = base area x height x 1/3 Base area = base length x base width. (Watch out for integer division). 394994.2632752.qx3zqy7 1 import java.util.Scanner; 2 3 public class CalcPyramidVolume { 4 5 * Your solution goes here public static void main (String [] args) { Scanner scnr = new Scanner(System.in); double userLength; double userWidth; double userHeight; 6 7 8 9 10 11 12 13 14 15 16 userLength = scnr.nextDouble(); userWidth = scnr.nextDouble(); userHeight = scnr.nextDouble(); Dol I test passed All tests passed
What is the appropriate code using the existing code provided? Thank you.
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am