Computer Science, asked by Anonymous, 11 months ago

Writ a program to display the series upto n terms:
-1,2,7, 14......
no copy or spam is allowed!!

Answers

Answered by devilwalker
1

Answer:

Refer to the attachment

Attachments:
Answered by jainishpjain
1

class

{

public static void main(int n)

{

int c = -1,d =1;

for(int x = 0 ; x <= n ; ++x)

{

System.out.println(c);

d = d + 2 ;

c = c + d ;

}

}

}

Similar questions