Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 places

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro SQL Server Wait Statistics

Authors: Enrico Van De Laar

1st Edition

1484211391, 9781484211397

More Books

Students also viewed these Databases questions

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago