Computer Science, asked by pratapndhal2010, 8 months ago

Write a program in java to find the sum of the series:-
S=1/2+2/3+3/4......19/20.

This is a challenge.
Anyone who gives the correct answer will be marked as brainliest.​

Answers

Answered by veermanav
2

Answer:

class sum {

public static void main(String [] args) {

int s = 0;

int j = 0;

for(int i = 1; i <= 19; i++)

{

j = i+1;

s = s+ i/j;

}

System.out.println("The Sum is " +. s);

}

}

Similar questions