Untitled

mail@pastecode.io avatar
unknown
c_cpp
7 months ago
379 B
2
Indexable
Never
#include <iostream>
using namespace std;

int main()
{
	int a, b, sum = 0, i = 0, c = 1, max = 0;
	cin >> a;
	while (a)
	{
		b = a % 10;
		if (b > max) max = b;
		else if (b == 6) c++;
		sum += b;
		i++;
		a /= 10;
	}
	if (c >= 3) cout << "WARNINING THREE 666";
	else if (sum % 2 == 0 and i < 4) cout << "Max chislo is: " << max;
	else cout << "Norm chislo";
}
Leave a Comment