Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with pila, Ada.Text_IO, Ada.Integer_Text_IO;
- use pila, Ada.Text_IO, Ada.Integer_Text_IO;
- procedure Ejercicio_10_pila is
- E:Elemento;
- begin
- Put("Los elementos insertados son: [");
- for i in 1..10 loop
- E:=Elemento(i);
- Push(E);
- Put(E'Img);
- if i /= 10 then
- Put(", ");
- else
- Put("]");
- end if;
- end loop;
- New_Line;
- Put_Line("Se han insertado los 10 elementos en la cola");
- Put("Los elementos eliminados son: [");
- while Empty = false loop
- Pop(E);
- Put(E'Img);
- if Empty = false then
- Put(", ");
- else
- Put("]");
- end if;
- end loop;
- end Ejercicio_10_pila;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement