Computer Science, asked by beethi04, 8 months ago

Write an algorithm to input two numbers and check whether they are multiples of 5 or not.

Answers

Answered by kalaiselvipalnimuthu
1

Answer:

Run a loop and subtract 5 from n in the loop while n is greater than 0. After the loop terminates, check whether n is 0. If n becomes 0 then n is multiple of 5, otherwise not.

please mark me as a brainleast

Answered by TheArkhamKnight
2

Answer:

In Python:

num1 = input("Enter a number: ")

num2 = input("Enter another number: ")

if num1%5==0:

              print("First number is divisible by 5")

if num2%5==0:

              print("Second number is divisible by 5")

Explanation:

Similar questions