// Ex361.cc // // Sec. 3.6.1 of Lecture // Math. functions, #include #include main() { double x,y,z; x = -1; // x < 0 !! y = sqrt(x); // Square root with wrong argument cout << "x = " << x << " , y = " << y << endl; // Absolut value z = fabs(x); cout << "x = " << x << " , |x| = " << z << endl; // Power function y = 3.0; // try 2.0 , 3.0 and 2.5 z = pow(x,y); cout << "(x,y) = " << x << " , " << y << " , x^y = " << z << endl; }