0
how do i
How do i select multiples of 3, 2, 5 etc... while in a "while" loop?
3 Answers
+ 4
Evann Elmore the modulo operator % comes in handy to solve that problem. For instance, if x%3 == 0 it tells you that x is a multiple of 3. In other words when the remainder of x/3 is zero it is a multiple of 3. Can you figure out the rest?
+ 3
Evann Elmore very well. If you get stuck, feel free to show what you have so far and ask for help. There are lots of friendly helpers here. Welcome to the Sololearn Community.
+ 2
yes, i think so, thank you.
im new to coding