Write a program in c plus plus to calculate the sum of the following series.
Sum = 1/2+2/3+3/4+.........+n/(n+1)
Answers
Answered by
2
Answer:
code:
Explanation:
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i,n,sum=0;
cout<<“1+2+3+……+n”;
cout<<“nEnter the value of n:”;
cin>>n;
for(i=1;i<=n;++i)
sum+=i;
cout<<“nSum=”<<sum;
getch();
}
Similar questions
Accountancy,
5 months ago
Biology,
5 months ago
English,
5 months ago
Business Studies,
10 months ago
History,
10 months ago
Geography,
1 year ago
Math,
1 year ago
Math,
1 year ago