C++ Math
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
Example2: The min(
a,b)
function would have used to find the lowest value of a and b as shown below:
For example :
Output : 12
C++ <cmath> Header:
The <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.
Example3:
Output:
Some Other popular for C++ Mathematical functions as shown below:
