Untitled
unknown
c_cpp
2 years ago
379 B
10
Indexable
#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";
}Editor is loading...
Leave a Comment