0
How to obtain a power of any number using c++ programming?
8 ответов
+ 2
there are two ways first is using pow function of header file math.
second is by loop i. e.,
int p,n;
cout<<"enter no and it's power";
cin>>n>>p;
for(int i=0;i<p;i++)
{
n*=n;
}
cout <<n;
0
for square of a number...check out this program....Analyze it..http://www.sololearn.com/app/cplusplus/playground/cFoOpABtPdY4/
0
use pow exp
0
thank you for help
0
welcome actually it is included <math.h >header file
0
ok
0
adding pow function