Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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;
}
Source by www.cplusplus.com #
 
PREVIOUS NEXT
Tagged: #sqrt #cpp
ADD COMMENT
Topic
Name
6+5 =