Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void sterge(nod*&p)
- {
- while(p!=NULL&&p->info%2==0)
- {
- nod*q=p;
- p=p->urm;
- delete q;
- }
- nod*d=p;
- if (d!=NULL)
- while (d->urm!=NULL)
- {
- if (d->urm->info%2==0)
- {
- nod*q=d->urm;
- d->urm=q->urm;
- delete q;
- }
- else
- d=d->urm;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement