Computer Science, asked by Raghu7128, 1 year ago

Java series 2 5 10 17 26....n . In loop


Answers

Answered by gurukulamdivya
5

Answer: Logic for the series is

1 X 1 + 1= 2                  

2 X 2 + 1= 5

3 X 3 + 1= 10

4 X 4 + 1= 17

5 X 5 + 1  = 26

class series

{

public static void main(String args[])

{

int d,i,n=10;

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

{                                                    

 d=i * i+1;                          

System.out.print(d+”,”);

}

}

}

Answered by mohdislam5546
0

Answer:

I also want to know it is very complicated p

Similar questions