Computer Science, asked by ritukumari18972, 7 hours ago

Write a program to print first ‘n’ odd numbers in descending order.
Eg: if number is 10, then the output is 9 7 5 3 1.

Answers

Answered by shrutisinghrajput142
0

Explanation:

n = int(input("Enter a number:")) for i in range(n - 1, -1, -1): a = 1 + i * 2 print("List are:", a)

Output:

Enter a number:10 List are: 19 List are: 17 List are: 15 List are: 13 List are: 11 List are: 9 List are: 7 List are: 5 List are: 3 List are: 1

Similar questions