#include <stdio.h>
int power(int,int);
int r;
main()
{
int a,b;
printf("you are finding a power b\n");
printf("enter in form of ' a space b' \n");
scanf("%d%d",&a,&b);
power(a,b);
printf("%d",r);
}
power(int a,int b)
{ int i;
r=1;
for(i=1;i<=b;i++)
{ r=r*a; }
return r;
}
int power(int,int);
int r;
main()
{
int a,b;
printf("you are finding a power b\n");
printf("enter in form of ' a space b' \n");
scanf("%d%d",&a,&b);
power(a,b);
printf("%d",r);
}
power(int a,int b)
{ int i;
r=1;
for(i=1;i<=b;i++)
{ r=r*a; }
return r;
}
No comments:
Post a Comment