// Computes the size of a dog house that can be purchased \ // given the user's budget. \ // uses pre-defined function sqrt() // Walt Savitch // 2/8/99 #include #include using std::cout; using std::cin; using std::endl; int main() { const double costPerSqFt = 10.50; cout << "Enter the amount budgeted for your dog house $"; double budget; cin >> budget; const double area = budget/costPerSqFt; const double sideLength = sqrt(area); cout << "For a price of $" << budget << endl << "I can build you a luxurious square dog house\n" << "that is " << sideLength << " feet on each side.\n"; }