Untitled
#include <iostream> #include <cmath> using namespace std; int e(int b) { int y = 2; int i = 0; while (y <= (b / 2)) { if (b % y == 0) { i++; cout << y << endl; } y++; } return i; } int main(){ int b; cin >> b; cout << e(b); return 0; }
Leave a Comment