//A power function without multiplication
//Just loving this beautiful algo that I have just made...
--hope, you will enjoy too......
//Just loving this beautiful algo that I have just made...
--hope, you will enjoy too......
- int pow (int Rn, int n, int r)
- { int i=O, temp_Rn=O;
if(n>1)
- { for(i=O;i<r;i++)
- {
- temp_Rn=temp_Rn+Rn;
- }
- temp_Rn=pow(temp_Rn,n-1,r);
- retrn temp_Rn; /// :D :D :D
- }
- else
- retrn Rn;
}