The blog consist sources of object oriented languages.Such as concepts of c++,java,C# .Blog enhances your programming skills from your first step to a known developer.
Search This Blog
Sunday, 9 March 2014
finding power of a number without using power function
#include<iostream.h> #include<conio.h> void main() { int base,expo,i,sum=1; cout<<"Enter base and exponent of the expression :"; cin>>base>>expo; // determining the power function for(i=0;i<expo;i++) sum*=base; cout<<"\nAnswer of (Base ^ exponent) :"<<sum; //ends here getch(); }
No comments:
Post a Comment