Write a program that includes two functions, one each tocalculate the volume of a cone and a the volume of a pyramid. Thevolume of a cone is 1/3 x pi x radius2 x height. Thevolume of a pyramid is 1/3 x length x width x height. Pass thenecessary parameters to the appropriate function then return thevolume to the main program and output results. For full creditallow the user to run the program multiple times and decide when toquit. Be careful of integer division errors. To get the sameresults as below set pi = 3.14159. (Hint: don’t use pi as avariable; try double pie = 3.14159. I need this in C++

I G:CodeBlocks-EPMarsh2050binDebugMarsh2050.exe What shape would you like the volume for? (c-cone, p-pyramid) C what is the radius of your cone? 12 What is the height of your cone? 5 The volume of your cone is 753.982 units. Would you like to input another shape? (y or n) y what shape would you like the volume for? (c-cone, p-pyramid) p what is the length of your pyramid? 4 What is the width of your pyramid? 9 What is the height of your pyramid? 8 The volume of your pyramid is 96 units. Would you like to input another shape? (y or n) y what shape would you like the volume for? (c-cone ,p-pyramid) C what is the radius of your cone? 5 what is the height of your cone? 9 The volume of your cone is 235.619 units. Would you like to input another shape? (y or n) n Show transcribed image text I G:CodeBlocks-EPMarsh2050binDebugMarsh2050.exe What shape would you like the volume for? (c-cone, p-pyramid) C what is the radius of your cone? 12 What is the height of your cone? 5 The volume of your cone is 753.982 units. Would you like to input another shape? (y or n) y what shape would you like the volume for? (c-cone, p-pyramid) p what is the length of your pyramid? 4 What is the width of your pyramid? 9 What is the height of your pyramid? 8 The volume of your pyramid is 96 units. Would you like to input another shape? (y or n) y what shape would you like the volume for? (c-cone ,p-pyramid) C what is the radius of your cone? 5 what is the height of your cone? 9 The volume of your cone is 235.619 units. Would you like to input another shape? (y or n) n

## Expert Answer

Answer to Write a program that includes two functions, one each to calculate the volume of a cone and a the volume of a pyramid. T…