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;
9.0m questions
11.6m answers