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 / s.d.bahinipati

#include<stdio.h>
#include<math.h>
main()
{
int i,j,n,x,fact=1;
float c,t,sum=1;
printf("enter the value of x and n);
scanf("%d%d",&x,&n);
while(i<n-1)
{
c=pow(x,i);
for(j=1;j<i;j++)
fact=fact*j;
t=c/fact;
sum=sum+t;
}i=i+1;
printf("the sum of series is %f",sum);
getch();
}

Is This Answer Correct ?    34 Yes 28 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a program flowchart and how does it help in writing a program?

1082


How to Throw some light on the splay trees?

1003


write a program to create a sparse matrix using dynamic memory allocation.

4835


Why can’t constant values be used to define an array’s initial size?

1323


What is storage class?

1012


Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.

1921


hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .

2391


largest Of three Number using without if condition?

1525


What is the use of a semicolon (;) at the end of every program statement?

1410


What are different types of pointers?

1011


Is it possible to pass an entire structure to functions?

941


What is dynamic dispatch in c++?

990


If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.

2211


What is the difference between far and near ?

1155


Distinguish between actual and formal arguments.

1012