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

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

View Full Document Right Arrow Icon
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 sample program to see where I want you to put the preconditions and postconditions.) 8. Separate parts of your program with blank lines and label the input
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/06/2008 for the course COSC 1436 taught by Professor May during the Spring '08 term at Dallas Colleges.

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 Right Arrow Icon
Ask a homework question - tutors are online