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
When would you use a pointer to a function?
What are the advantage of c language?
Why is c not oop?
What is structure data type in c?
What is the description for syntax errors?
Why enum is used in c?
hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm
What are different storage class specifiers in c?
How many loops are there in c?
How do you convert strings to numbers in C?
Difference between goto, long jmp() and setjmp()?
What is the c language function prototype?
A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles
Can we use any name in place of argv and argc as command line arguments?
Explain how do you use a pointer to a function?