Computer Science, asked by sunitazirange, 1 year ago

Write a java program to print the series S=1/2+1/3+1/4+1/5+1/6+1/7+1/8+1/9+1/10+1/11+1/12+1/13+1/14+1/15 and also find the value of 'S'.
plzzzz answer fast!!!

Answers

Answered by neetesh21
1

Answer:

class series

{

public static void main (String arts[])

{

int S=0;

for (int i=2, i<=15;i++)

S=S+(1/i) ;

System. out. println("Sum is "+S) ;

}

}

Similar questions