Untitled
unknown
c_cpp
2 years ago
371 B
6
Indexable
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';
	}
}
Editor is loading...
Leave a Comment