Advertisement
Guest User

Untitled

a guest
Jan 26th, 2020
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. public bool Eliminar(int dato)
  2. {
  3. if (!(EstaVacio()))
  4. {
  5. for (int i = 0; i < this.top; i++)
  6. {
  7. if (this.arreglo[i] == dato)
  8. {// fijamos el valor de i
  9. for (int y = i; y < this.top - 1; y++)
  10. this.arreglo[y] = this.arreglo[y + 1];
  11. this.top--;
  12. return true;
  13. }
  14. }
  15. return false;
  16. }
  17. return false;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement