Untitled

 avatar
unknown
c_cpp
a year ago
371 B
5
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