Untitled
unknown
c_cpp
a year ago
258 B
1
Indexable
#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); }
Editor is loading...
Leave a Comment