Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Requirements: -ONLY C++ -PI should be decleard as #define PI 3.14 -Use of -use of -Use of other libraries not allowed Using the formula below,
Requirements: -ONLY C++
-PI should be decleard as #define PI 3.14
-Use of
-use of
-Use of other libraries not allowed
Using the formula below, write a program incorporating a function tocalculate the volume of a truncated cone given the height, the radius of the base, and theangle in degrees formed by the centerline and the side of the cone at the apex. Theformula for the volume is:
TR3 (R-y tan 0) 3 tanb 3 tanG where y is the height, R is the radius, and is the angle in radians. Use a preprocessor command to define PI. In function main, prompt the user for the values of R and y in meters, and angle in degrees, and read in the values. Then call a function. Coneyolume, to calculate volume of the truncated cone. Print the volume in function main with 3 decimal digits. Function ConeVolume receives radius, height, and angle of cone in degrees and calculates the volume of the truncated cone. It returns the volume to function main Test with the following values: R 2.5 meters y 3 meters angle 30 degreesStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started