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 sizeof int in c?
List some basic data types in c?
number of times a digit is present in a number
Is null always equal to 0(zero)?
How can I make sure that my program is the only one accessing a file?
How can I do peek and poke in c?
What is sizeof int?
Are c and c++ the same?
What is preprocessor with example?
Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?
Describe the order of precedence with regards to operators in C.
What is structure packing in c?
What is the use of typedef in c?
Explain enumerated types in c language?
Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.