Write a Python program to check whether a number is divisible by 5 and 11 or not.

SOLUTION....

# Program to check divisibility by 5 and 11

# Input
num = int(input("Enter a number: "))

# Check divisibility
if num % 5 == 0 and num % 11 == 0:
    print("number is divisible by both 5 and 11 :- ",num)
else:
    print("Number is NOT divisible by both 5 and 11 :- ",num)

OUTPUT

Leave a Reply

Your email address will not be published. Required fields are marked *

sign up!

We’ll send you the hottest deals straight to your inbox so you’re always in on the best-kept software secrets.