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

If null and 0 are equivalent as null pointer constants, which should I use?

1120


What is volatile variable how do you declare it?

1027


Explain how to reverse singly link list.

1073


How would you obtain the current time and difference between two times?

1237


What are the advantages of c language?

1042


What is difference between structure and union with example?

990


When is a void pointer used?

1192


What is c preprocessor mean?

1243


How do I create a directory? How do I remove a directory (and its contents)?

1098


The statement, int(*x[]) () what does in indicate?

1085


Explain how can I make sure that my program is the only one accessing a file?

1167


How is pointer initialized in c?

976


What are header files and explain what are its uses in c programming?

1065


how can use subset in c program and give more example

1928


Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc

5556