Question: 1. Write a program that calculates the area and volume of a cylinder: There are the rest of the directions ^ Project 3, Program Design
Project 3, Program Design (50 points) Write a program that calculates the volume and area of an cylinder. The program should include the following function. Do not modify the function prototype. 1. void vol_area (double radius, double height, double* vol, double* area); The function takes two parameters of double for the height and radius of the cylinder. The vol parameter points to a vriable in which the function will store the volume of the cylinder. The area parameter points to a variable in which the function will store the area (including the top, bottom, and side) of the cylinder. 1) Name your program cylinder.c. 2) Define PI as a constant 314 1 592 65359 3) The main function should ask the user to enter the radius and height of the cylinder and call the vol area function to calculate the volume and area. The main function should contain the printf statements that display the result 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
Get step-by-step solutions from verified subject matter experts
