crsandu

Untitled

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