Computer Science, asked by archishaduttadgp, 9 months ago

write a program to input a number if the number is positive then check it is odd or even if it is negative checked it is divisible by 5 or not gw basic fast its urgent​

Answers

Answered by shikharrajurkar577
4

Answer:

In python you can write it as

x = print(input("Enter your no. ="))

if x>0:

if x/2==0:

print(x,"is an even number.")

else:

print(x,"is an odd number.")

elif x<0:

if x/5==0:

print(x," is negative and divisible by 5")

else print(x," is negative number but is not divisible by 5")

else print(x," is a virtual number.")

Thanks for watching this!

Answered by gaganadithyareddy9
0

Answer:

Hey! This is in python...

x = int(input("Enter a number: "))

if x>0:

if x%2 == 0:

print("The number is an even number")

else:

print("The number is an odd number"

else:

if x%5 == 0:

print("The number is divisible by 5...")

else:

print("The number is not divisible by 5...")

# HOPE THIS HELPS YOU!!

Similar questions