Due Dates
Section 0201: Wednesday, November 8 by midnight
Section 0601: Friday, November 3 by midnight
NO LATE PROJECTS WILL BE ACCEPTED!
Point Value
This assignment is worth 25 points.
Assignment
Write a program called circle.c that gets the diameter of a circle from
the user and prints the radius, diameter, area, and circumference of that circle. Use a #define preprocessor directive to define the constant PI as 3.14159. You should use floating point variables.
The output from your program should look EXACTLY like the bolded text in the sample run given below. Also make sure that the spacing of the output (i.e., blank lines and blanks spaces) is EXACTLY like the spacing in the sample run.
This is the Circle Program
Enter the diameter of the circle: 9.5
Radius = 4.750000
Diameter = 9.500000
Area = 70.882126
Circumference = 29.845104
Make sure to test your program by running it several times with different values for the diameter. Verify the results by using a calculator. (Note that the last few digits for each value may differ when using a calculator. That is OK.) You may assume that the user will type in a value greater than 0.0 for the diameter of the circle.
Coding Standards
Note that you MUST adhere to the coding standards and indentation style given on the Projects home page. So read them carefully and immediately!
Project Submission
Submit your project by e-mailing your source code (circle.c) to Evelyn (cwang3@cs.umbc.edu) as an attachment. Make the Subject of the e-mail Project 1 so that Evelyn knows what it is. Do NOT send your executable file (a.out).