with Ada.Text_IO, Ada.Integer_Text_IO; use Ada.Text_IO, Ada.Integer_Text_IO; procedure Count_Loop is I : Integer := 1; Groesste_Zahl : Integer; begin put ("Groesste Zahl: "); get (Groesste_Zahl); put (I, 1); -- loop if I < Groesste_Zahl then I := I + 1; Put (I); Put (", "); end if; New_Line; if I = Groesste_Zahl then exit; end if; end loop; -- loop if I > Groesste_Zahl then I := I - 1; Put (I); Put (", "); end if; if I = 1 then null; end if; exit; end loop; end Count_Loop;