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 C program that computes the value ex by using the
formula
ex =1+x/1!+x2/2!+x3+3!+………….

Answer Posted / dally

#include<stdio.h>
int main()
{
char c = 'X';
int i,n,sum = 0;
printf("Enter values for n\n");
scanf("%d\n",&n);
for(i=0;i<n;i++)
{
sum = sum+power(c,i)/fact(i);
}
fact(int i)
{
int p=1 ,fact;
if(p<=i)
{
fact = p*fact(p++);
}
return fact;
}

Is This Answer Correct ?    24 Yes 43 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When would you use a pointer to a function?

1010


What are the advantage of c language?

1018


Why is c not oop?

937


What is structure data type in c?

983


What is the description for syntax errors?

1106


Why enum is used in c?

905


hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm

1981


What are different storage class specifiers in c?

1055


How many loops are there in c?

1061


How do you convert strings to numbers in C?

1182


Difference between goto, long jmp() and setjmp()?

1134


What is the c language function prototype?

1050


A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles

1135


Can we use any name in place of argv and argc as command line arguments?

1034


Explain how do you use a pointer to a function?

1068