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
Explain the term printf() and scanf() used in c language?
What is the best way to comment out a section of code that contains comments?
What are actual arguments?
please give me some tips for the placement in the TCS.
What will the code below print when it is executed? int x = 3, y = 4; if (x = 4) y = 5; else y = 2; printf ("x=%d, y=%d ",x,y);
hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm
What are the features of the c language?
Read the following data in two different files File A: aaaaaaaadddddddd bbbbbbbbeeeeeeee ccccccccffffffff File B: 11111111 22222222 33333333 By using the above files print the following output or write it in the Other file as follows aaaaaaaa11111111dddddddd bbbbbbbb22222222eeeeeeee cccccccc33333333ffffffffffff
What is malloc and calloc?
Whats s or c mean?
What is the benefit of using #define to declare a constant?
Why is C language being considered a middle level language?
What's a good way to check for "close enough" floating-point equality?
What is variable in c example?
can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......