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 |
print 1-50 with two loop & two print Statement
Every time i run a c-code in editor, getting some runtime error and editor is disposing, even after reinstalling the software what may be the problem?
increment operateor (++)and decrament(--) #include<stdio.h> #inclide<conio.h> main() { int x=15; while(x!=0) scanf("%d",&x); {
Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
what is the c.
who invented c
write a program to find out number of on bits in a number?
Difference between goto, long jmp() and setjmp()?
how c source file in converted to exe file
is compiler do read the data line by line or not. ??
6 Answers LG Soft, Satyam, Tech Mahindra,
program to find the magic square
What are the similarities between c and c++?