/* testmath.cpp CIS 150 5/31/2005 David Klick This program demonstrates some basic math library functions. */ #include using std::cout; int main(void) { double x=5.78, y=6.45, z=-3.2; cout << fabs(x) << ", " << fabs(y) << ", " << fabs(z) << '\n'; cout << ceil(x) << ", " << ceil(y) << ", " << ceil(z) << '\n'; cout << floor(x) << ", " << floor(y) << ", " << floor(z) << '\n'; cout << fmod(7.6, 3.7) << '\n'; cout << sqrt(9.0) << '\n'; cout << pow(4.0, 3.0) << '\n'; return 0; }