Untitled

mail@pastecode.io avatar
unknown
c_cpp
23 days ago
277 B
0
Indexable
Never
#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";
	}
} 
Leave a Comment