For finding the square of any number, we have many method but some methods are:
-Here we find the sqaure of the number by the pow() function that are predefined in math library.
-We pass two argument in this function, first arguement is number and second argument is power.
#include < iostream>
cout<<"Sqaure is: "<
Square of 25 is 625
Square of 4 is 16
-In this program, we include the math library by #include< math.h> so that pow()
function do not give any kind of error.
- we take an input of the number and pass in pow(n,2)
which return the sqaure of the number.