Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void inserare()
- {
- int i;
- nod *x,*q;
- x=niu;
- if (x->inf%2==0)
- {
- q=new nod;
- q->inf=0;
- q->leg=niu;
- niu=q;
- x=niu->leg;
- }
- nod *xx=x->leg;
- i=2;
- while(i<=n)
- {
- if (xx->inf%2==0)
- {
- q=new nod;
- q->inf=0;
- q->leg=xx;
- x->leg=q;
- }
- x=xx;
- xx=x->leg;
- ++i;
- }
- return ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement