0
How to find sqrt roots of an quadratic equation in c++
write down
2 Respostas
+ 1
You can use the function sqrt() defined in the <cmath> header file to compute square roots.
Just include the header in your program to use it.
Link: http://www.cplusplus.com/reference/cmath/sqrt/
On the other hand, you could make your own function. Here is an example on how to do that (not my own though):
https://code.sololearn.com/c8S3I68d2mv5/?ref=app
0
#include <cmath>
int a = 36;
cout << sqrt(a);
Output: 6