Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- using namespace std;
- int main() {
- int a,sum = 0, b;
- cin >> a;
- while (a>0) {
- b = a % 10;
- if (b%2==0) {
- sum++;
- }
- a /= 10;
- }
- cout << sum;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement