crsandu

Untitled

Jan 3rd, 2016
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. Problema:
  2.  
  3. #include <iostream>
  4. using namespace std;
  5. int nr, n, ok = 0;
  6. int main()
  7. {
  8.   cin >> n;
  9.   for (int i=1; i<=n; i++)
  10.   {
  11.     cin >> nr;
  12.     if (nr % 2 == 1)
  13.     {
  14.       ok = 1;
  15.     }
  16.   }
  17.   if (ok != 1)
  18.   {
  19.     cout << "DA";
  20.   }
  21.   else
  22.   {
  23.     cout<< "NU";
  24.   }
  25.   return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment