Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Written in C, thanks 1. (50 points) Write a program that reads the values for the radius and height of a solid cylinder using two

image text in transcribed Written in C, thanks

1. (50 points) Write a program that reads the values for the radius and height of a solid cylinder using two variables of type double, and then calculates the surface area and volume of the cylinder. The program should include the following function. Do not modify the function prototype. void area_volume (double radius, double height, double *pointer_area, double *pointer_volume); The function takes two parameters of double type for the radius and height of the cylinder. The pointer_area parameter points to a variable in which the function will store the area of the circle. The pointer_volume parameter points to a variable in which the function will store the volume of the cylinder. 1) Name your program cylinder.c 2) The main function should ask the user to enter the radius of the cylinder and call the area_volume function to calculate the area and volume. 3) The area volume function does NOT print the area, volume, or anything else. The area and volume of the cylinder passed back from the two pointer arguments pointer_area and pointer volume are printed out in the main function 4) The main function should contain the printf statements that display the area and volume with three decimal digits. Example input/output: Enter the radius of the cylinder: 3.4 Enter the height of the cylinder: 8.2 Output: The volume of the cylinder is 297.798 and the area is 247.809

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

Genomes And Databases On The Internet A Practical Guide To Functions And Applications

Authors: Paul Rangel

1st Edition

189848631X, 978-1898486312

More Books

Students also viewed these Databases questions

Question

10. Microsoft Corporation

Answered: 1 week ago

Question

4. EMC Corporation

Answered: 1 week ago