Untitled

mail@pastecode.io avatar
unknown
plain_text
10 months ago
282 B
1
Indexable
#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