Describe for loop and write a c program to sum the series
X + x2/2! + x3 /3! + …….. up to fifteen terms.
Answer Posted / sai
#include<math.h>
void main()
{
int i,sum=0,x;
clrscr();
printf("enter x value");
scanf("%d",&x);
for(i=1;i<=15;i++)
sum=sum+((x*i)/fact(i));
printf("sum of x+x2/2!.......x15/15!=%d",sum);
getch();
}
| Is This Answer Correct ? | 10 Yes | 13 No |
Post New Answer View All Answers
Describe how arrays can be passed to a user defined function
What is the total generic pointer type?
Does c have an equivalent to pascals with statement?
What does a pointer variable always consist of?
using only #include
What is a shell structure examples?
Who developed c language?
What does void main () mean?
How can I sort a linked list?
What is equivalent to ++i+++j?
Difference between pass by reference and pass by value?
What is 1f in c?
What is an operator?
What is meant by operator precedence?
Explain what are header files and explain what are its uses in c programming?