Project 1 - Circle

Due: Monday, April 10 BEFORE CLASS


Write a program called circle.c that gets the radius of a circle from the user and prints the 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.

This is the Circle Program

Enter the radius of the circle: 18.2

Diameter = 36.400002
Area = 1040.620361
Circumference = 114.353882

Note that you MUST adhere to the coding standards and indentation style given on the Projects home page. So read them carefully and immediately!

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).


Last Modified: Friday, 31-Mar-2000 12:35:45 EST

Friday, 31-Mar-2000 12:35:45 EST