public static int countMultiples(int low, int high, int x) {
int count = 0;
for (int i = low; i <= high; i++) {
if (i % x == 0) {
count++;
}
return count;
8.4m questions
11.1m answers