header

Homework 11

This assignment is a modification of homework 3. The changes are in the miscellaneous requirements at the bottom.

Output Requirements

Output the radius, diameter, circumference, and area of a circle. Each value is to be displayed on a separate line and labeled and formatted as illustrated below.

Lab 1 Example

 Input Requirements

Ask the user to enter the value of the radius.

Process Requirements

Calculate the diameter (2r), the circumference (2πr), and the area (πr2) of the corresponding circle. You may assume that the user will enter a positive value for the radius.

Miscellaneous Requirements

You are to use three value-returning functions in your program:

  1. Given the radius of a circle, the function 'diameter' returns the diameter of the circle.
  2. Given the radius of a circle, the function 'circumference' returns the circumference of the circle.
  3. Given the radius of a circle, the function 'area' returns the area of the circle.