Question: Notes: * The function should contain local variables and a constant declared and must have the calculation, it may not do anything else such as

 Notes: * The function should contain local variables and a constant

Notes: * The function should contain local variables and a constant declared and must have the calculation, it may not do anything else such as input or output. * You may not declare "global" variables anywhere. No variables above or outside of main() and the function are allowed. * A value-returning function should be used because it's a little simpler to understand, but you can employ a void function if you desire. * Be sure to have a function prototype at the top of the code, then main, then your function. * You may test your code by copying and running the original program ( with only main() ), then comparing the results to your new program. * Test with "real" numbers including decimals, like 3.4 and 5.8 * Don't use 1 anywhere - that number is so simple it can give the right answer sometimes if the program is wrong. Please help thank you!!!

1) This is a bit different from your earlier work as you are not writing a new program this time. Recall the Cone Volume Calculator program from earlier Instructor Comments lCone Volume Calculator Program II Intro C++, Lesson 4 l Written by Bill H, Nov 2013 #include using namespace std int main() //Declare variables and constants double coneRadius 0.0 double coneHeight = 0.0; const double PI3.1415 double coneVolume 0. /Prompt the user for inputs cout >coneRadius cout > coneHeight /Do the calculation coneVolume 0.3333 * PI coneRadius coneRadius * coneHeight //Display the result cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!