diff --git a/C/power of a number b/C/power of a number new file mode 100644 index 0000000..f803bfa --- /dev/null +++ b/C/power of a number @@ -0,0 +1,19 @@ +#include +using namespace std; +void power(int,int); +int main() +{ + int x,y; + cout<<"Enter the value of x and y"<>x>>y; + power(x,y); + return 0; +} +void power(int a,int b) +{ + int i,pro=1; + for(i=1;i<=b;i++) + pro=a*pro; + cout<<"X raised to the power y: "<