Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please program in c Using pointers, write a C program with a call-by-reference function that finds the volume (V), the base area (B), the lateral
please program in c
Using pointers, write a C program with a call-by-reference function that finds the volume (V), the base area (B), the lateral surface area (L), and the total surface area (A) of a circular cone, where Formulae: V = (1/3) pi r^2 h B = pi r^2 L = pi r Squareroot(r^2 + h^2) A = L + B = pi r(r + Squareroot(r^2 + h^2)) Let PI = 3.14159 Create a function with the following header. After calculating the required values, return the values back to the main function. No output should be printed within the function. The function should only perform calculations. void calculate_formulae (double radius, double height, double *volume, double *baseArea, double *lateralSurfaceArea, double * surf ace Area); In the main function, prompt the user for radius and height, and also use an input validation loop to make sure that the entered values are greater than zero. Call the calculate formulae function and pass the variables to it. After the function call, print the values of volume, baseArea, lateralSurfaceArea and surfaceArea with 2 decimal placesStep 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