Question
Computer Science II assignment #5 Write a C program named assignment04.cpp that will 1. ask for and read in a float for a radius 2.
Computer Science II assignment #5 Write a C program named assignment04.cpp that will 1. ask for and read in a float for a radius 2. ask for and read in a float for the height 3. each of the following functions will calculate some property of a shape (area, volume, circumference, etc) 4. The functions will accept one or two parameters (radius and/or height) and return the proper calculation. 5. There is no input/output (cin or cout) in the function just the calculation 6. write the following functions a. float areaCircle(float radius) where the area of a circle is calculated by area = PI * radius * radius b. float circumCircle(float radius) where the circumference of a circle is calculated by circumference = PI * radius * 2 c. float areaCylinder(float radius, float height) where the area of a cylinder is calculated by area = 2 * PI * radius * radius + height * PI * radius * 2 d. float volumeCylinder(float radius, float height) where the volume of a cylinder is calculated by volume = PI * radius * radius * height e. float volumeCone(float radius, float height) where the area of a cylinder is calculated by volume = (1 / 3) * (PI * radius * radius * height)
Step 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