1.

Math Functions

Answer»
cout << max(100, 110); // Returns max value

The above function returns the maximum value.

cout << min(1, 0); // Returns min value

The above function returns the minimum value.

cout << sqrt(625); // Returns square root

The above function returns the square root of the given value.

cout << ceil(a); // Returns ceil value

The above function returns the ceil value.

cout << floor(a); // returns floor value

The above function returns the floor value.

cout <<pow(a, b) // returns a raised to the power b

The above function returns a to power b.




Discussion

No Comment Found