ĐIẾM SỐ PHẦN TỬ CHẲN TRONG DS LK ĐƠN

int demchan(list l)
     {
          int d=0;
          for(node *i=l.head;i!=NULL;i=i->pnext)
        if(i->key%2==0) 
            d++;
     return d;
     }

Share this

Related Posts

Previous
Next Post »