# Answer to Question #62135 in MatLAB | Mathematica | MathCAD | Maple for william

Question #62135

Determine the number of positive integers x, where x <100 and x is divisible by 2,3 or 5

Expert's answer

#include <iostream>

int main() {

int count = 0;

for (int i = 1; i < 100; i++) {

if (i % 2 == 0 || i % 3 == 0 || i % 5 == 0) count++;

}

std::cout << count;

return 0;

}

int main() {

int count = 0;

for (int i = 1; i < 100; i++) {

if (i % 2 == 0 || i % 3 == 0 || i % 5 == 0) count++;

}

std::cout << count;

return 0;

}

Need a fast expert's response?

Submit orderand get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

## Comments

## Leave a comment