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

In C language what is a 'dangling pointer'?

1062


Does free set pointer to null?

952


What is scanf () in c?

1055


write a program in c language to print your bio-data on the screen by using functions.

6733


What is the function of this pointer?

1218


What is the significance of an algorithm to C programming?

996


what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9

1781


What is the process to generate random numbers in c programming language?

1098


What is the difference between local variable and global variable in c?

1163


What the advantages of using Unions?

1163


Explain what is the difference between a free-standing and a hosted environment?

1126


In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping

1419


Is return a keyword in c?

1030


write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)

2048


How can I invoke another program (a standalone executable, or an operating system command) from within a c program?

1130