#include<stdio.h> #include<conio.h> void main() { int n,i; float s=0; /* s for sum which is a float value as division occurs */ clrscr(); printf("\n Enter n\n"); scanf("%d", &n); for(i=1;i<=n; ++i) s=s+i/(i+1.0); /* 1.0 because we have make it float value otherwise result becomes 0 */ printf("sum of series = %.3f\n",s); getch(); }Output:Enter n 10 sum of the series=7.980