fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int ile = 0;
  7. int t;
  8. cin>>t; ile=0;
  9. for(int i=0; i<t; i++) {
  10. int liczba;
  11. cin>>liczba;
  12. if(abs(liczba)%2==1) ile++;
  13. }
  14. cout<< ile;
  15. return 0;
  16. }
Success #stdin #stdout 0.01s 5280KB
stdin
2
3 7
40 46
stdout
2