Program to test divisibility of a number with another number.
Answers
Answered by
1
Answer:
tep by step descriptive logic to check whether a number is divisible by 5 and 11 or not. Input a number from user. To check divisibility with 5, check if(num % 5 == 0) then num is divisible by 5. To check divisibility with 11, check if(num % 11 == 0) then num is divisible by 11.
Answered by
3
num1=int(input(" Enter the first number:")
num2=int(input("Enter second number:")
remainder=number1%number2
if remainder==0
print (number1,"is divisible by", number 2)
else:
print (number1,"is not divisible by", number 2)
Similar questions