print the sum of series of
1+ 1/2+1/3+1/4+....+nth term
using JAVA
Answers
Answered by
0
for(i=1;i<=n;i++)
s+=1/i;
System.out.println("Sum = "+s);
This is only the logic part rest you can write.....
s+=1/i;
System.out.println("Sum = "+s);
This is only the logic part rest you can write.....
Similar questions