If you can perform mathematical tasks on numbers C++ provides you various functions for performing mathematical tasks on numbers.
Example1: The max(a,b) function can used to find the highest value of a and b as shown below:
Output : 29
) function would have used to find the lowest value of a and b as shown below:
For example :
Output : 12
C++ <cmath> Header:
<cmath> header file found in various
sqrt (square root),
round (rounds a number) and
log (natural logarithm),
Sin,cos,tan(trigonometric ratio) and so on.
Some Other popular for C++ Mathematical functions as shown below: