How to use square root in C++

1 Answer

0 votes
#include <iostream>
#include <cmath>

using namespace std;

int main()
{
	cout << sqrt(36) << endl;
	cout << sqrt(20) << endl;
}




/*
run:

6
4.47214

*/

 



answered May 7, 2019 by avibootz
edited May 7, 2023 by avibootz
...