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 ();
}
Welcome to " way2cplusplus.blogspot.in " Objective of this blog is to implement various Computer Science Engineering Lab problems into C++ programming language. These are basically most common Lab Exercise problems based on the curriculum of engineering colleges throughout the Nation. These lab exercises are also relevant to Data structure. Simply C++ programming zone...
No comments:
Post a Comment