Two numbers are entered through the keyboard. Write a program to find the value of one number raised to the power of another.
void main()
{
float a,p,t;
printf("\nInput two number, first is digit second is power");
scanf("%f%f",&a,&p);
t=1;
while(p>0)
{
t=t*a;
p--;
}
printf("\nThe answer is %f",t);
}
Subscribe to:
Post Comments (Atom)
Very Good Bro Carry On Thanks For salution
ReplyDelete