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
please give me some tips for the placement in the TCS.
Tell me with an example the self-referential structure?
i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none
What is c system32 taskhostw exe?
Can we compile a program without main() function?
Subtract Two Number Without Using Subtraction Operator
What are the main characteristics of c language describe the structure of ac program?
What does char * * argv mean in c?
What is structure pointer in c?
What is the benefit of using #define to declare a constant?
What is the best way of making my program efficient?
what is event driven software and what is procedural driven software?
What is a void pointer in c?
what is reason of your company position's in india no. 1.
find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2