Computer Science, asked by nandinijain9, 9 months ago

2,1,4,3,6,5,8,7,....,n. write a python program.

Answers

Answered by shubham71488
1

Answer:

n=int(input('Enter max number to print'))

a=2

while a<=n:

print(a,end=" ")

print(a-1,end=" ")

a+=2

Attachments:
Similar questions