Computer Science, asked by Therocks8710, 10 months ago

To print the series 3,-6,9,-12......n terms.

Answers

Answered by panth23patel
1

Explanation:

IT IS A JAVA CODE.

int a =0;

number=3

for(int i =1; i<=n÷3;i++)

{

if(i%2==0)

a = number*i;

else

a = number*(-i);

}

Similar questions