Computer Science, asked by shrishti111213, 5 hours ago

write a program to find and print the sum of the 1/2+2/3+3/4+....10/11​

Answers

Answered by prekshakothari61
0

ONLY FOR JAVA

public static void main(String[ ] args) {

if (args.length == 0) {

System.out.println("Please give n.");

return;

}

int n = Integer.parseInt(args[0]);

double s = 0;

for(int i=1; i<=n; i++) {

s += (i * 1.0) / (i + 1.0);

}

System.out.println("Sum = " + s);

}

Answered by maanvikJ
0
Answer:

4/5, 5/6, 6/7, 7/8, 8/9, 9/10

...HOPE IT HELPS...

Please mark as Brainliest.
Similar questions