+ 1

I don’t know how doing this program for me is difficult

given two numbers num1 and num2, find the common divisors

11th Oct 2021, 12:17 PM
Francesco D’Errico
2 Respostas
+ 1
Just check them one by one. Because it's common divisors you need to find, the range will be from 1 to the minimum of num1 and num2. Then loop this range and check whether both remainders are 0.
11th Oct 2021, 12:23 PM
你知道規則,我也是
你知道規則,我也是 - avatar
+ 1
Find minimum number out of two.. And check for every number from 1 to minimum number.. if it divisible by both num1 and num2 .. if so then print it.. Check out this.. hope it helps :) https://code.sololearn.com/cGJwgIJTRCQ3/?ref=app
11th Oct 2021, 1:57 PM
Indira
Indira - avatar