Horje
sqrt cpp Code Example
sqrt cpp
#include <math.h>

//get square root of a number "b"
int main(){
  	int a = 2; //declare number you want to take square root of
  	int sqrtNum = sqrt (a); //assign the sqrt value to a variable
  	cout << sqrtNum << endl;
	return 0;
}
sqrt in c++
#include <iostream>
#include <cmath>
using namespace std;

int main()
{
	int x = 625;
	int result = sqrt(x);
	cout << "Square root of " << x << " is " << result << endl;
	return 0;
}




Cpp

Related
how to declare 1-D array in C/C++ Code Example how to declare 1-D array in C/C++ Code Example
arduino notone Code Example arduino notone Code Example
cout char32_t c++ Code Example cout char32_t c++ Code Example
c++ if example Code Example c++ if example Code Example
c++ remove space from string Code Example c++ remove space from string Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8