fork download
  1. WITH Ada.Text_IO, Ada.Integer_Text_IO;
  2. USE Ada.Text_IO, Ada.Integer_Text_IO;
  3.  
  4. PROCEDURE Prog1 IS
  5. a, b, c :integer:=0;
  6. BEGIN
  7.  
  8. LOOP
  9. A:=B;
  10. b:=c;
  11. Put("Podaj liczbe: ");
  12.  
  13. Get(c);
  14.  
  15. exit when c=0;
  16. Put(a);
  17. Put(B);
  18. put(c);
  19. new_line;
  20.  
  21. end loop;
  22.  
  23. END Prog1;
  24.  
  25.  
Runtime error #stdin #stdout 0.01s 1868KB
stdin
Standard input is empty
stdout
Podaj liczbe: