Untitled

mail@pastecode.io avatar
unknown
c_cpp
10 days ago
258 B
0
Indexable
Never
#include <iostream>
#include <cmath>
using namespace std;

int IsPrime(int x) {
	int count = 0;
	for (int i = 2; i < x; i++) {
		if (x % i == 0) {
			count++;
		}
	}
	return count;
}

int main()
{
	int x;
	cin >> x;
	cout << IsPrime(x);
} 
Leave a Comment