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
Are bit fields portable?
What is the difference between Printf(..) and sprint(...) ?
void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }
How can you check to see whether a symbol is defined?
What are the features of the c language?
Explain how can you check to see whether a symbol is defined?
Are pointers integer?
What is advantage of pointer in c?
the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above
How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?
Are comments included during the compilation stage and placed in the EXE file as well?
What is putchar() function?
What is the c language function prototype?
What does %c mean in c?
Write a program to reverse a given number in c language?