**I need someone to explain how 15 30 45 are the results of this While Loop. I am not 100% sure if it works like this: **
1 is added to counter 5 which now becomes 6, and another 5 from mod is added to that 6 that makes a total of 11 now. 3 is also added to that 11 which now becomes 14 and 1 is added to that 14 which makes a total of 15 and so on… Do I get it correct?
Print all numbers divisible by 5 AND 3 between 5 and 50.
If you run the last code I posted, you will see that counter is the same number where it is referenced twice in the if statement condition. It only changes during the next iteration (the counter += 1).