#include #include // file: math.cc // demonstrate use of library math functions // functions that return values int main() { double number; cout << "Enter a number: "; cin >> number; cout << "The sine of " << number << " is " << sin(number) << endl; cout << "The cosine of " << number << " is " << cos(number) << endl; cout << "The square root of " << number << " is " << sqrt(number) << endl; cout << "The ceiling of " << number << " is " << ceil(number) << endl; cout << "The floor of " << number << " is " << floor(number) << endl; return 0; } Sample output: < math > The sine of 3.1416 is -7.34641e-06 > The cosine of 3.1416 is -1 > The square root of 3.1416 is 1.77246 > The ceiling of 3.1416 is 4 > The floor of 3.1416 is 3 < math > The sine of 3.14159 is 3.58979e-09 > The cosine of 3.14159 is -1 > The square root of 3.14159 is 1.77245 > The ceiling of 3.14159 is 4 > The floor of 3.14159 is 3 < math > The sine of 256 is -0.999208 > The cosine of 256 is -0.0397908 > The square root of 256 is 16 > The ceiling of 256 is 256 > The floor of 256 is 256