Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions maxoddno.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Python code to find the maximum ODD number

n = 0 # loop counter
num = 0 # to store the input
maxnum = 0 # to store maximum ODD number

# loop to take input 10 number
while n<10:
num = int(input("Enter your number: "))
if num%2 != 0:
if num > maxnum:
maxnum = num
n += 1

# printing the maximum ODD number
print("The maximum ODD number :",maxnum)