#include using namespace std; int main(){ int x, count = 0; cin >> x; do{ int digit = x % 10; if(digit % 2 == 0) count++; x = x / 10; }while(x > 0); cout << count << endl; return 0; }

2 条评论

  • @ 2026-1-14 16:44:58

    #include

    using namespace std;

    int main(){

    int x, count = 0;

    cin >> x; jhkhos;ithjotrp do{

    int digit = x % 10;

    if(digit % 2 == 0){

    count++;

    x = x / 10;

    } while(x > 0);

    cout << count << endl;

    return 0;

    }

    • @ 2026-1-12 16:49:48

      #include

      using namespace std;

      int main(){

      int x, count = 0;

      cin >> x; jhkhos;ithjotrp do{

      int digit = x % 10;

      if(digit % 2 == 0){

      count++;

      x = x / 10;

      } while(x > 0);

      cout << count << endl;

      return 0;

      }

      • 1