//A program that sometimes throws and exception and sometimes does not #include #include #include using namespace std; int main() { try{ double x; cout << "input a positive number: "; cin >> x; if( x<0 ) throw range_error("Input not positive"); cout << "Square root of " << x << " = " << sqrt(x) << endl; } catch(exception &e) { cerr << e.what()<