/*--------------------------------------------------------------------*/ /* This program computes the area of an ellipse with semiaxes a and b. */ #include using namespace std; const double PI = 3.141593; int main() { /* Declare variables. */ double a, b, area; /* Enter the semiaxes of the ellipse. */ cout << "Enter the semiaxe a of the ellipse: "; cin >> a; cout << "Enter the semiaxe b of the ellipse: "; cin >> b; /* Compute the area of the ellipse. */ area = PI * a * b; /* Print the value of the area. */ cout << "The area of a ellipse with semiaxes " << a << " and " << b << " is: " << area << endl; /* Exit program. */ return 0; } /*--------------------------------------------------------------------*/