Difficulties with this line if(!(i%j)) break; . Found that this expression is (i%j)==0 .
Question: why?
Difficulties with this line if(!(i%j)) break; . Found that this expression is (i%j)==0 .
Question: why?
if ( Если ! Не (i%j) i при делении на j дает ненулевой остаток ) break; закончить цикл Those. - end the cycle when i is divided by j ...
The percent sign is the remainder of the division. Your (i% j) == 0 literally means that the value of i is completely divisible by j. Like 4/2 = 0. Add this to the condition and get: if i / j = 0 then break; The exclamation mark does not mean the truth is not to divide i completely by j
Source: https://ru.stackoverflow.com/questions/673473/
All Articles