    01: #include <iostream>
    02: #include <string>
    03: #include <cmath>
    04:
    05: using namespace std;
    06:
    07: int main()
    08: {
    09:    double area;
    10:    cout << "Please enter the area of a square: ";
    11:    cin >> area;
    12:
    13:    if (area >= 0)
    14:       cout << "The side length is " << sqrt(area) << "\n";
    15:    else
    16:       cout << "Error: Negative area.\n";
    17:
    18:    return 0;
    19: }