#include <stdio.h>
float pows(float,float);
int main()
{
float num,base;
printf("enter base followed by power integer.");
scanf("%f %f",&base,&num);
printf("%f ",pows(base,num));
return 0;
}
float pows(float base,float n)
{
if(n==0)
return(1);
else if(base==0)
return(0);
else
for(;n>=1;n--)
{ return(base*pows(base,n-1));/*recursive*/
}
}
D33wakar 36 Posting Whiz in Training
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
D33wakar 36 Posting Whiz in Training
D33wakar 36 Posting Whiz in Training
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
D33wakar 36 Posting Whiz in Training
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
D33wakar 36 Posting Whiz in Training
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
D33wakar 36 Posting Whiz in Training
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
D33wakar 36 Posting Whiz in Training
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
D33wakar 36 Posting Whiz in Training
D33wakar 36 Posting Whiz in Training
D33wakar 36 Posting Whiz in Training
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
D33wakar 36 Posting Whiz in Training
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
D33wakar 36 Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.