Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int howManyMultiplesOfMBetweenXAndY(int m, int x, int y) {
- int count = 0;
- for (int i = x; i <= y; i++) {
- if (i % m == 0) {
- count++;
- }
- }
- return count;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement