Ex 1: Write a program that uses functions cube and cone to calculate the volume of the two shapes. The program will ask
Posted: Sun May 15, 2022 10:08 am
Ex 1: Write a program that uses functions cube and cone to calculate the volume of the two shapes. The program will ask the user to enter 1 to calculate the cube volume and 2 calculate the cone volume. Sample run: This program can calculate the volume of a cube and a cone. Enter 1 to find a cube volume Enter 2 to find a cone volume 1 Enter the side length 3 The volume of the cube is: 27 This program can calculate the volume of a cube and a cone. Enter 1 to find a cube volume Enter 2 to find a cone volume 2 Enter the radius and height of the cone, respictively h V = ar? 3 3 4 The volume of the cone is: 37.68