Showing posts with label Power Of Number Using Function. Show all posts
Showing posts with label Power Of Number Using Function. Show all posts

Sunday, 15 January 2012

Program Of Power Of Number Using Function In C++

#include<iostream.h>
#include<conio.h>
#include<math.h>
void sum(int x,int y,int z);
main()
{
clrscr();
float p,r,t,m;
cout<<"enter numbers=";
cin>>p>>r>>t;
sum(p,r,t);
getch();
}
void sum(int x,int y,int z)
{
float m,n,o,ci;
m=(1+r/100);
n=pow(m*t);
o=p*n;
ci=o-p;
cout<<ci;
}