Question: need in c language Without changing code given below, complete the following C program by writing functions prototypes and functions bodies to find diameter, circumference
need in c language
Without changing code given below, complete the following C program by writing functions prototypes and functions bodies to find diameter, circumference and area of a circle. Here is a demo. $ a.out Enter radius of the circle: 10 Diameter of the circle = 20.00 units Circumference of the cir cle = 62.83 units Area of the circle = 31 4.16 sq. units // C program to find diameter, circumference and are a of a circle using functions #include #define PI 3.1415 // Your Function prototypes should be listed first*/ int main() { float radius, dia, circ, ar; /* Reads radius of the circle from user */ printf("Enter radius of the circle: "); scanf("%f", &radius); dia = diameter(radius); //Call di ameter function circ = circumference(radius); //Ca ll circumference function ar = area(radius); //Call area function 10/17/22, 9:11 AM Quiz 03 (2.4 and 2.5) : 2022 Fall 01 Computer systems and Low-Level Programming https://templeu.instructure.com/courses/118797/quizzes/361255 6/7 Your Answer: printf("Diameter of the circle = %.2f units ", dia); printf("Circumference of the circle = %.2f units ", circ); printf("Area of the circle = %.2f sq. units ", ar); return 0; } // Your Function implementations should be listed la st*/ // diameter function: Find the diameter of a circle whose radius is given. Remember diameter = 2 * Radi us // circumference function: Find circumference of the circle whose radius is given. Remember circumference = 2 * PI * Radius // area function: Find area of the circle whose radi us is given. Remember Area = PI * Radius 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
