Question: Write an application in C program (CalcCircumference) that inputs from the user the radius of a circle as an integer and prints the circle's diameter,

Write an application in C program (CalcCircumference) that inputs from the user the radius of a circle as an integer and prints the circle's diameter, circumference and area using the floating-point value 3.14159 for it. Use the following formulas (r is the radius): diameter = 2r circumference = 27tr area = Tr? Do not store the results of each calculation in a variable. Rather, specify each calculation as the value that will be output in a printf statement. [Note: that the values produced by the circumference and area calculations are floating-point numbers. Such values can be output with the format specifier %f in a printf statement.] Hints: - For this exercise, output all floating-point values using the %f format specifier. - printf("Area is %f ", (PI * radius * radius ) ); Sample Output: Enter radius: 3 Diameter is 6 Area is 28.274334 Circumference is 18.849556
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
