Thursday 31 January 2013

power function in c++ by Zafar Iqbal Lavi

#include<iostream>
#include<conio.h>
#include<math.h>

void main()
{     double x,y,p;
cout<<"enter base            ";
cin>>x;
cout<<"enter it's power        ";
cin>>y;
p=pow(x,y);
cout<<"\n\nPower of "<<x<<" to "<<y<<" is "<<p;
getch();
}

0 comments:

Post a Comment