Answer:
Explanation:
The following is written in Java. It takes in the three values as parameters and then uses the formula for calculating the volume of a pyramid. Finally, returning the volume to the user. A test case has been provided in the main function and the output can be seen in the attached picture below.
class Brainly {
public static void main(String[] args) {
double output = calc_pyramid_volume(4.5, 2.1, 3.0);
System.out.println(output);
}
public static double calc_pyramid_volume(double base_length, double base_width, double pyramid_height) {
double volume = (base_length * base_width * pyramid_height) / 3;
return volume;
}
}