Question
C++ Code Help Problem: Create a program that will calculate the volume and surface area of a cone using a function other than main. Your
C++ Code Help
Problem: Create a program that will calculate the volume and surface area of a cone using a function other than main.
Your program will contain two functions other than main: one to check the validity of the entered dimensions and one to calculate the volume and surface area of the cone.
Your function to check the validity of entered dimension should be a value-returning function that accepts two parameters: one a double for the dimensions and one a string for what the dimension represents (such as radius of cone or height of cone).
The function should return a valid value to the function call. Your second function should be a void function that will calculate the volume and surface, then send these values back to the function call. Do not use the same identifiers for variables in multiple functions! Carefully choose which parameters should be passed by reference and which should be passed by value.
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