Computer Science, asked by Shoaeeb620, 8 months ago

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 hudanaeem20
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