Write a C program that computes the value ex by using the
formula
ex =1+x/1!+x2/2!+x3+3!+………….
Answer / 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 |
what is the difference between malloc() and calloc() function?
What is volatile variable in c with example?
what is the full form of c language
How to write a multi-statement macro?
Write a program for Overriding.
The code is::::: if(condition) Printf("Hello"); Else Printf("World"); What will be the condition in if in such a way that both Hello and world are printed in a single attempt?????? Single Attempt in the sense... It must first print "Hello" and it Must go to else part and print "World"..... No loops, Recursion are allowed........................
14 Answers HOV Services, IBM, Potty,
Why c is called a mid level programming language?
How we can insert comments in a c program?
Explain a file operation in C with an example.
AMMONG THE 4 STROAGE CLASSES IN C, WHICH ONE FASTEST?
wat is the output int main() { char s1[]="Hello"; char s2[]="Hello"; if(s1==s2) printf("Same"); else printf("Diff"); }
Tell us two differences between new () and malloc ()?