Python Compiler
num1 = 12; num2 = 24; min = (num1 < num2) and num1 or num2; print("Common Divisors of %d and %d: " % (num1 , num2)) for i in range(1, min+1): if((num1 % i == 0) and (num2 % i == 0)): print(i, end=" ")
OUTPUT
Common Divisors of 12 and 24: 1 2 3 4 6 12
×
Save as
Private
Tag
AJAX
Canvas
CSS
Google Charts
HTML
Javascript
jQuery
JSON
SASS
SVG
Description
Save