Computer Science, asked by chatterjeedoyepekaiv, 1 year ago

Write a Java program to print the series: 2,3,6,11,18,27,18,51​

Answers

Answered by mn121
3

public class series

{

   public static void main(String args[])

   {

       int i,x=-1,a=3;

       for(i=1;i<=8;i++)

       {

           a=a+x;

           System.out.print(a+",");

           x=x+2;

       }

   }

}


mn121: please mark it as brainliest...
Similar questions