Home
Explore
Places
win7
win8
Coding
Friday, 8 February 2013
12
What is the following function doing?(Mathematical Expression)
int foo(int x, int n)
{
int val = 1;
if (n > 0)
{
if (n % 2 == 1)
val *= x;
val *= foo(x * x, n / 2);
}
return val;
}
12
2013-02-08T06:33:00-08:00
cvs
prgm|