#include<iostream.h> float powerec(float b, float r) { if(r==0) return 1; else return(b*powerec(b,r-1)); } void main() { float b,r; b=0; r=0; cout<<"\nEnter The Base: "; cin>>b; cout<<"\nEnter The Power: "; cin>>r; float res=powerec(b,r); cout<<"\nThe Result Is: "<<res; }
No comments:
Post a Comment