Advertisement
Josif_tepe

Untitled

Apr 19th, 2024
819
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int n;
  6.     cin >> n;
  7.    
  8.    
  9.     for(int i = 0; i < n; i++) {
  10.         int x;
  11.         cin >> x;
  12.        
  13.         int dali_e_sostaven_od_parni = 1;
  14.         while(x > 0) {
  15.             int cifra = x % 10;
  16.             if(cifra % 2 == 1) {
  17.                 dali_e_sostaven_od_parni = 0;
  18.             }
  19.             x /= 10;
  20.         }
  21.     }
  22.     return 0;
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement