/** * Sample program to compute area and circumference. * Discussed in class, 09/02/98. * Author: Mark A. Weiss */ #include int main( ) { const double PI = 3.1416; double radius; double area; double circumference; // Read the radius cout << "Please enter the radius of the circle: "; cin >> radius; // Compute the area and circumference area = PI * radius * radius; circumference = 2.0 * PI * radius; // Output the results cout << "The area of the circle is " << area << "." << endl; cout << "The circumference of the circle is " << circumference; cout << "." << endl; // Previous line was too long, so I broke it in 2. return 0; }