DEV Community

AbreuY
AbreuY

Posted on • Updated on

[Python] Determine if the first number is a multiple of the second

Statement:
Given two integers, determine if the first number is a multiple of the second.


Solution:

number1 = int(input("Write a number"))
number2 = int(input("Write other number"))

if number1 % number2 == 0:
    print(f'Is multiple of {number1}')
else:    
    print(f'Is not a multiple of {number2}')
Enter fullscreen mode Exit fullscreen mode

View working code

Top comments (0)