Contact: aviboots(AT)netvision.net.il

21,340 questions

28,140 answers

573 users

// A factor is a number that divides the given number without a remainder #include <iostream> int main() { int n = 24; for (int i = 1; i <= n; i++) { if (n % i == 0) { std::cout << i << " "; } } return 0; } /* run: 1 2 3 4 6 8 12 24 */