write a program to find and print the sum of the 1/2+2/3+3/4+....10/11
Answers
Answered by
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
0
Answer:
4/5, 5/6, 6/7, 7/8, 8/9, 9/10
...HOPE IT HELPS...
Please mark as Brainliest.
4/5, 5/6, 6/7, 7/8, 8/9, 9/10
...HOPE IT HELPS...
Please mark as Brainliest.
Similar questions
Computer Science,
1 month ago
Computer Science,
3 months ago
Math,
3 months ago
Math,
10 months ago
Science,
10 months ago