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 / tirtharaj dash

#include<stdio.h>
#include<conio.h>
#define e 2.718281828

int main()
{
double ex=e;
int x,i=0;
printf("\nenter the power : ");
scanf("%d",&x);
while(i++!=x-1)
{
ex*=e;
}
printf("\nthe result is : %f",ex);
getch();
return 0;
}

/*i hope u get the logic.....TR dash*/
note:--->run in dev C++ / TC

Is This Answer Correct ?    9 Yes 17 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is echo in c programming?

1006


How can a string be converted to a number?

1004


What is structure in c definition?

1035


What is sizeof int in c?

1045


Explain what is a program flowchart and explain how does it help in writing a program?

1086


What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.

4272


I have seen function declarations that look like this

1030


How do shell structures work?

1094


What is c language and why we use it?

1053


Write a program to know whether the input number is an armstrong number.

1102


what are the different storage classes in c?

1171


What is meant by initialization and how we initialize a variable?

1039


Who developed c language?

1072


What is meant by realloc()?

1123


What are the different types of data structures in c?

1149