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 |
Subtract Two Number Without Using Subtraction Operator
why do we use # in c-language?
What is the diffrent between while and do while statement ?
Explain what is a 'locale'?
how to create c progarm without void main()?
what is the output of the below code? main( ) { printf ( "\nOnly stupids use C?" ) ; display( ) ; } display( ) { printf ( "\nFools too use C!" ) ; main( ) ; }
List the difference between a "copy constructor" and a "assignment operator"?
Explain setjmp()?
#include<stdio.h> void main() { int a=5,b=6,c; int x=(a<b)+7; int y=(x==7)*9; int z=(c=x+y)*2; printf("%h %h %h",x,y,z); } What is the output? Explain it.
what is purpose of fflush(stdin) function
Write a program to enter the name and age. If age>28 then find salary categories. if age<28 then find that you are gaduate or not.
What is the difference between if else and switchstatement