write a program to enter a number.If the number is positive even,display three succeeding even numbers.If the number is negative odd,display three preceeding odd numbers otherwise the number is neutral.
Answers
Answered by
0
# using python
number = int(input("Enter a Number"))
if number>0 and number%2==0:
print(number+2 )
print(number+4)
print(number+6 )
elif number<0 and number %2==1:
print(number+2 )
print(number +4)
print(number+6 )
else:
print("number is neutral")
Similar questions