Title: Check whether the given number
either even or odd
Program:
n=int(input("Enter n value\n"))
if(n%2==0):
print(n," is a even
number")
else:
print(n," is a odd
number")
Output:
Enter n value
3
3 is a
odd number
>>>
Enter n value
6
6 is a
even number
Comments
Post a Comment