Followers

Friday, December 23, 2011

CALCULATING EXPONENT USING - math.h

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

void main()
{
 clrscr();
 int x, n;
 cout<<"Enter the base ";
 cin>>x;
 cout<<"Enter the power ";
 cin>>n;
 cout<<"The result of the given exponent is : "<<pow(x,n);
 getch();
}
.................................................................
OUTPUT:(click to enlarge the image)

No comments:

Post a Comment