Computer Science, asked by kumaresankp21, 10 months ago

write a short program to print following series.
1 4 7 10 ...........40​

Answers

Answered by Arpitmaurya123bdh
1

Explanation:

Answer:

a = 1

while a<=40:

if a%2==0:

print(-a, end=' ')

else:

print(a,end=' ')

a=a+3

Similar questions