Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
293 B
1
Indexable
Never
#include <iostream>

using namespace std;

int main()
{
	int A;
	cin >> A;

	int count_even = 0;
	int count_odd = 0;

	while (A > 0) {
		if ((A % 10) % 2 == 0) {
			count_even += 1;
		}
		else count_odd += 1;

		A /= 10;
	}

	cout << count_even << " " << count_odd;
}