Write a c program for sum of first n terms of the series
S = 1 - (1/3) + (1/5) -(1/7) + (1/9) ......
Answer Posted / lavanya
void main()
{
int i,n,sum;
printf("enter n");
scanf("%d",&n);
for(i=1,i<=n,i++)
{
sum=1;
sum=sum+(1%(2i+1));
printf("sum=%d");
}
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Why isnt any of this standardized in c?
What tq means in chat?
What is the difference between struct and typedef struct in c?
If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?
What is a loop?
What is the difference between call by value and call by reference in c?
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
Explain goto?
What is c definition?
Is c still relevant?
What is scope rule in c?
What is c system32 taskhostw exe?
i want to know the procedure of qualcomm for getting a job through offcampus
Is c easier than java?
the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b