Untitled

mail@pastecode.io avatar
unknown
c_cpp
11 days ago
371 B
1
Indexable
Never
using namespace std;
#include <iostream>

int IsPrime(int x) {
	bool count = 1;
	if(x%2==0){
		count = true;
	}
	else
		count = false;

	return count;
	
	}
	


int main() {
	setlocale(LC_ALL, "rus");
	{
		int x;
		cin >> x;
		if (IsPrime(x) == 1) {
			cout << "четный" << '\n';
		}
		else cout << "не четный" << '\n';

	}
}

Leave a Comment