Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
323 B
2
Indexable
#include <iostream>
using namespace std;
int main()
{
	int a;
	cin >> a;
	int count = 0;
	int c=0;
	int even=0;
	int odd=0;
	int cifra=0;
	while (a > 0){
		cifra = a % 10;
		if (cifra % 2 == 0) {
			even += 1;
		}
		else odd += 1;
		
		c += cifra;
		a /= 10;
		count++;
	}
		
	cout << even << odd;
}