Write a program to check whether a given number is divisible by 5 or not.

 Rule :– A number is divisible by 5 only when reminder of the number with 5 is 0.(i.e number%5==0)

Program:-

num=int(input(“Enter number:-“))
if(num%5==0):
print(“Number is divisible by 5”)
else:
print(“Number is not divisible 5”)

Output:-

Enter number:-10
Number is divisible by 5

Leave a Reply

Your email address will not be published.