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
English,
7 months ago
Computer Science,
7 months ago
History,
1 year ago
English,
1 year ago
Chemistry,
1 year ago