-- Chapter 18 - Program 3 with Ada.Text_IO, Ada.Integer_Text_IO; use Ada.Text_IO, Ada.Integer_Text_IO; procedure Recurson is Index : INTEGER; procedure Print_And_Decrement(Value : in INTEGER) is New_Value : INTEGER; begin Put("The value of the index is now"); Put(Value, 3); New_Line; New_Value := Value - 1; if New_Value > 0 then Print_And_Decrement(New_Value); end if; end Print_And_Decrement; begin Index := 7; Print_And_Decrement(Index); end Recurson; -- Result of execution -- The value of the index is now 7 -- The value of the index is now 6 -- The value of the index is now 5 -- The value of the index is now 4 -- The value of the index is now 3 -- The value of the index is now 2 -- The value of the index is now 1