Write a Java program to print the series: 2,3,6,11,18,27,18,51
Answers
Answered by
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