Advertisement
Guest User

Untitled

a guest
Oct 10th, 2015
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. void inserare()
  2. {
  3. int i;
  4. nod *x,*q;
  5. x=niu;
  6. if (x->inf%2==0)
  7. {
  8. q=new nod;
  9. q->inf=0;
  10. q->leg=niu;
  11. niu=q;
  12. x=niu->leg;
  13. }
  14. nod *xx=x->leg;
  15. i=2;
  16. while(i<=n)
  17. {
  18. if (xx->inf%2==0)
  19. {
  20. q=new nod;
  21. q->inf=0;
  22. q->leg=xx;
  23. x->leg=q;
  24. }
  25. x=xx;
  26. xx=x->leg;
  27. ++i;
  28. }
  29. return ;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement