Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are the two forms of #include directive?

1123


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

2629


Why do we use return in c?

960


What is the purpose of void pointer?

1002


What are the advantages of c language?

1059


What is the best way to store flag values in a program?

1025


Tell me can the size of an array be declared at runtime?

1002


What is the difference between ‘g’ and “g” in C?

3943


Is sizeof a keyword in c?

928


What is dynamic memory allocation?

1306


What are valid operations on pointers?

1162


What is ctrl c called?

1011


Is c pass by value or reference?

1010


Write a program to print “hello world” without using semicolon?

1089


What is array of structure in c programming?

1256