Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int n;
- int nb(int niza[], int i){
- if(i==n){
- return 0;
- }
- if(niza[i]%2!=0){
- return nb(niza, i+1)+1;
- }
- else{
- return nb(niza, i+1);
- }
- }
- int main()
- {
- cin>>n;
- int niza[n];
- for(int i=0; i<n; i++){
- cin>>niza[n];
- }
- cout<<nb(niza,0)<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement