Untitled
unknown
c_cpp
2 years ago
277 B
11
Indexable
#include <iostream>
using namespace std;
bool IsPrime(int x) {
if (x % 2 == 0) {
return 1;
}
if (x % 2 > 0) {
return 0;
}
}
int main()
{
int x;
cin >> x;
if (IsPrime(x) == 1) {
cout << "YES";
}
if (IsPrime(x) == 0) {
cout << "NO";
}
} Editor is loading...
Leave a Comment