Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

pow c++

template<class T>T Pow(T n,T p) 
{ 
  T res = n; 
  for(T i = 1; i < p; i++)  
     res *= n;  
  return res; 
}
//Example: Pow(2,3) = 8
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #pow
ADD COMMENT
Topic
Name
9+4 =