#include<math.h>//get square root of a number "b"intmain(){
int a = 2; //declare number you want to take square root ofint sqrtNum = sqrt (a); //assign the sqrt value to a variablecout << sqrtNum << endl;
return0;
}
#include<iostream>#include<cmath>usingnamespacestd;
intmain(){
double x = 10.25, result;
result = sqrt(x);
cout << "Square root of " << x << " is " << result << endl;
return0;
}