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
Explain what are binary trees?
Explain how do you use a pointer to a function?
Explain what is the concatenation operator?
What is C language ?
If fflush wont work, what can I use to flush input?
How the c program is executed?
what is the syallabus of computer science students in group- 1?
What is a null string in c?
What is dangling pointer in c?
Is flag a keyword in c?
can any one tel me wt is the question pattern for NIC exam
How do you convert strings to numbers in C?
What is a newline escape sequence?
What are the 4 data types?
What does c mean in basketball?