fork download
  1. with Ada.Text_IO; use Ada.Text_IO;
  2. with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
  3.  
  4. procedure Test is
  5. subtype Small is Integer range 0..99;
  6. Input : Small;
  7. begin
  8. loop
  9. Get(Input);
  10. if Input = 42 then
  11. exit;
  12. else
  13. Put (Input);
  14. New_Line;
  15. end if;
  16. end loop;
  17. end;
Success #stdin #stdout 0.01s 5280KB
stdin
1
2
10
42
11
stdout
          1
          2
         10