#include <iostream>
#include <cmath>
using namespace std;
double squareRoot(double number)
{
return pow(number,0.5);
}
int main()
{
cout << "Enter a number: ";
double number;
cin >> number;
cout << "Square root of " << number << " is " << squareRoot(number) << endl;
return 0;
}
Comments
Leave a comment