{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Program1

# Program1 - COSC1415/COSC1436 Section 8001 8am Lab Page 1 of...

This preview shows pages 1–2. Sign up to view the full content.

COSC1415/COSC1436 Section 8001 – 8am Lab Page 1 of 2 Name Chintu Patel 8001 C++ Programming Assignment #1 TOPIC: Arithmetic Expressions/Value-Returning Functions/Formatting Output VALUE: 10 points DATE DUE: Wednesday, February 13 Program Statement Write a program that will prompt the user to enter the radius of a circle. The program should calculate the diameter, the circumference, and the area of a circle. The program should output the radius, diameter, circumference, and area properly labeled.. Program Specifics: 1. Include a comment after each #include directive indicating why the header file is needed in the program. 2. Declared a constant, PI, before the main function. In the declaration, assign PI the value of 3.14159. 3. Your program should have a labeled declaration section where each of your variables are declared. All variables should be meaningful and declared inside the main function. 4. Declare one variable per line and include a comment with each variable describing what the variable will do in the program. 5. Follow naming conventions for constants, variables and functions. 6. Use a value-returning function for each of the following calculations: diameter, circumference and area (There is a sample program on eCampus, under Programs that you can use as a reference as you write your program.) 7. Write preconditions and postconditions for each function. (Look at the

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 5

Program1 - COSC1415/COSC1436 Section 8001 8am Lab Page 1 of...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online