Computer Science, asked by starchase, 8 months ago

Q2. Write a program to print the sum of following series of numbers:
½+1/4+1/6+1/8+1/10​​

Answers

Answered by Anonymous
1

Answer:

mark brainliest

Explanation:

class series

{

   public static void main(String[]arg)

   {

     int n = 2;

      double sum=0.0;

       for(int a=2;a<=10;a++)

       {

           sum=sum + 1/a;

       }

       System.out.println("Sum of series="+sum);

   }

}

       

Similar questions