Question: Write a C program that calculates the circumference of a circle. The program should accomplish the tasks below: Define a constant for pi with at
Write a C program that calculates the circumference of a circle. The program should accomplish the tasks below: Define a constant for pi with at least six digits after the decimal point Prompt the user for the diameter of a circle Calculate the circumference Print the circumference with at most two digits after the decimal point (Round appropriately) to the screen (stdout) Print the radius of the circle with at most two digits after the decimal point (Round appropriately) to the screen (stdout) Sample Program Execution: Enter the diameter of a circle: 10 The circumference of the circle is: 31.42 The radius of the circle is: 5.00
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
