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 is a spanning Tree?
How will you find a duplicate number in a array without negating the nos ?
Explain why c is faster than c++?
Which is the memory area not included in C program? give the reason
what is ur strangth & weekness
to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?
Do variables need to be initialized?
When is a “switch” statement preferable over an “if” statement?
How can I trap or ignore keyboard interrupts like control-c?
Can a pointer be volatile in c?
Explain what math functions are available for integers? For floating point?
Explain how do you list files in a directory?
Explain the difference between call by value and call by reference in c language?
Which is best linux os?
#include