Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- int f(std:: vector<int> v)
- {
- for(int x: v)
- {
- if(x%2==0)
- {
- return true;
- break;
- }
- else return false;
- }
- }
- int main()
- {
- std:: cout<< "Unesite broj clanova niza: ";
- int n;
- std:: cin>> n;
- std:: vector<int> v(n);
- for(int x:v)
- std:: cin>> x;
- if(f(v))
- std:: cout<< "Ima parnih brojeva!";
- else
- std:: cout<< "Nema parnih brojeva!";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement