For finding the square of any number, we have many method but some methods are:
1.
number=3;
answer=number*number;
2.
number=3;
answer=pow(number,2);
-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.
program-
#include < iostream>
#include
int main()
{
int n,ans;
cout<<"Enter number"<
ans=pow(n,2);
cout<<"Sqaure is: "<
Enter number
25
Square of 25 is 625
Enter number
4
Square of 4 is 16