Advertisement
Guest User

Untitled

a guest
Nov 12th, 2019
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. if(cab==NULL)
  2. {
  3. if(nuevo->admin==true)
  4. {
  5. cab=nuevo;
  6. administrador=cab;
  7. administrador=administrador->siguiente;
  8. }
  9. else
  10. {
  11. cab=nuevo;
  12. cliente=cab;
  13. cliente=cliente->siguiente;
  14. }
  15. }
  16. else
  17. {
  18. aux=cab;
  19. while(aux!=NULL)
  20. aux=aux->siguiente;
  21.  
  22. if(nuevo->admin==true)
  23. {
  24. administrador->siguiente=nuevo;
  25. administrador=administrador->siguiente;
  26. }
  27. else
  28. {
  29. cliente=nuevo;
  30. cliente=cliente->siguiente;
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement