Program for determining the power of any integer value. Simply use of "math.h" header function for finding power.
Syntax of power is " pow(no,r) ",where no is the number and r is the power of a number..
Source Code:-
#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{clrscr();
double no,r,res;
cout<<"Enter Number : ";
cin>>no;
cout<<"Enter raised/power : ";
cin>>r;
res=pow(no,r);
cout<<"\nResult is "<< res;
getch ();
}
No comments:
Post a Comment