Computer Science, asked by pradipkumarmahatopm1, 16 days ago

Write a java program to find and display the sum of the given

series:​

Attachments:

Answers

Answered by abhipsapriyada4
2

Answer:

public class series

{

   public static void main()

   {

       int s=0,p=1;

       double sum=0;

       for(int x=1 ;x<=20 ;x++)

       {

           for(int y=1 ;y<=x ;y++)

           {

                s+=y;

                p*=y;

           }

       }

       sum =s/p;

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

   }

}

Hope it helps. Thanks

Similar questions