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.
plzzzzz answer it fast !
tomorrow is my exam!!!!!!!!
Answers
Answered by
0
Answer:
hope this helped you Mark me as the brainliest
Attachments:
Answered by
1
Explanation:
class Series
{
public static void main(String args[])
{
double s=0;
System.out.print("S=");
for(int i=1;i<=14;i++)
{
System.out.print("1/"+(i+1)+"+");
s=s+1.0/(i+1);
}
System.out.print("\b");
System.out.print("="+s);
}
}
Attachments:
Similar questions