Given a list of the integers and M, N and we have to print the numbers which are divisible by M, N in Python.
Example:
Input:
List = [10, 15, 20, 25, 30]
M = 3, N=5
Output:
15
30
To find and print the list of the numbers which are divisible by M and N, we have to traverse all elements using a loop, and check whether the number is divisible by M and N, if number is divisible by M and N both print the number.
Program:
Output
need an explanation for this answer? contact us directly to get an explanation for this answer