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

What is the use of bitwise operator?

1134


What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?

1083


Explain the binary height balanced tree?

1193


What is the time and space complexities of merge sort and when is it preferred over quick sort?

1085


What is the basic structure of c?

1087


Is there any possibility to create customized header file with c programming language?

1066


In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none

1213


What is console in c language?

1101


What do you mean by c what are the main characteristics of c language?

1037


What are the c keywords?

1207


Can we declare variable anywhere in c?

980


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.

2278


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

1001


Differentiate between the = symbol and == symbol?

1302


How can I swap two values without using a temporary?

1111