Upload
talha-yousuf
View
224
Download
0
Embed Size (px)
DESCRIPTION
pass jlsangoirejpoivjerpsobjsd
Citation preview
# include
/*************** METHOD -1 ****************/int power_byReference(int &b, int p){int static base = b;if (p==0)return 1;else{b = base*power_byReference(b,--p);return b;}}
/*************** METHOD -2 ****************/void power_byReference2(int &b, int p){int static base = b;if (p!=1){power_byReference2(b,--p);b = b*base;}}
int main(){int x = 0;int y = 0;
/********* METHOD - 1 *********/std::cout