Program to find the value of e raised to power x using while
loop
Answer Posted / pragathi
#include<stdio.h>
void main()
{
int i=1,e,x,s,p=1;
printf("Enter e and x :");
scanf("%d%d",&e,&x);
while(i<=x)
{
p=p*e;
i++;
}
printf("power is %d ",p);
}
here pow(e,x) is calculated using this program.
| Is This Answer Correct ? | 46 Yes | 40 No |
Post New Answer View All Answers
What are the two forms of #include directive?
the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b
Why do we use return in c?
What is the purpose of void pointer?
What are the advantages of c language?
What is the best way to store flag values in a program?
Tell me can the size of an array be declared at runtime?
What is the difference between ‘g’ and “g” in C?
Is sizeof a keyword in c?
What is dynamic memory allocation?
What are valid operations on pointers?
What is ctrl c called?
Is c pass by value or reference?
Write a program to print “hello world” without using semicolon?
What is array of structure in c programming?