Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n;
- cin >> n;
- int broj;
- bool parnost = true;
- bool redom = true;
- for (int i = 0; i <= n; i++) {
- cin >> broj;
- if (broj % 2 != 0) parnost = false;
- else if (broj % 2 == 0 && parnost == false) redom = false;
- }
- if (redom == true) cout << "da";
- if (redom == false) cout << "ne";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement