Iterative Power Calc
Power , x to the power y which means y number of times x must be multiplied to obtains the value of x to the power y.In this program this task is achieved using a loop
/*
http://www.ProbCOMP.com
Power , x to the power y which means y number of times x must be multiplied to obtains the value of
x to the power y.In this program this task is achieved using a loop
*/
int calc_power(int number,int power)
{
int value=1;
for(int i=0;i<power;i++)
{
value=number*value;
}
return value;
}
Download Program


