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

Why is c called c not d or e?

1101


in iso what are the common technological language?

2117


What is the difference between printf and scanf )?

1098


Do character constants represent numerical values?

1347


What is floating point constants?

1138


Why & is used in scanf in c?

1102


List the difference between a 'copy constructor' and a 'assignment operator' in C?

1092


how to find binary of number?

4455


Why dont c comments nest?

1050


How many levels of pointers have?

1056


What are file streams?

1020


What is the correct code to have following output in c using nested for loop?

1087


what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?

2390


Are there namespaces in c?

1133


What is the explanation for prototype function in c?

985