Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- unsigned int n, p=0, i=0, x, k;
- cin >> n;
- for (k = 1; k <= n; k++)
- {
- cin >> x;
- while (x != 0)
- {
- if (x % 10 % 2 == 0)
- p = p + 1;
- else
- i = i + 1;
- x = x / 10;
- }
- }
- cout << p << ' ' << i;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment