is there an easy (or even not easy) way to find the square root of a number in c++? like, well, actually i have no idea how you would do it.... is it even possible?
Printable View
is there an easy (or even not easy) way to find the square root of a number in c++? like, well, actually i have no idea how you would do it.... is it even possible?
look up sqrt() in cmath.
Code:#include <iostream>
#include <ctype.h>
#include <math.h>
using namespace std;
int main()
{
double find_sqrt;
cout << "Enter a double: ";
cin >> find_sqrt;
cout << sqrt(find_sqrt) << endl;
return 0;
}