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...

write a program that eliminates the value of mathematical
constant e by using the formula
e=1+1/1!+1/2!+1/3!+

Answer Posted / devang

/* Fact = factorial, n = no. of terms */
main()
{
int fact=1,i,n;
float e=0;
printf(" Enter the no. of terms");
scanf("%d",&n);

for(i=1;i<=n,i++)
{
fact=fact*i;
e = e + (1/fact);
}
printf("he value is = %f", e);
return 0;
}

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What would be an example of a structure analogous to structure c?

1001


Why can’t we compare structures?

1275


What is the use of the function in c?

1019


What are the advantages of c preprocessor?

1266


What is the difference between functions getch() and getche()?

1096


What is string length in c?

1103


Compare array data type to pointer data type

1037


What is the difference between class and object in c?

1178


What is function prototype in c with example?

1087


Differentiate between a for loop and a while loop? What are it uses?

1187


What do you understand by friend-functions? How are they used?

1209


Explain the difference between #include "..." And #include <...> In c?

1029


How do c compilers work?

1136


explain what are actual arguments?

1091


What is p in text message?

988