with Ada.Text_IO; use Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; procedure Guess is Answer : Integer := 47; Guess : Integer; begin loop Put ("Enter a number: "); Get (Guess); if Guess < Answer then Put_Line ("Too low!"); elsif Guess > Answer then Put_Line ("Too high!"); elsif Guess = Answer then Put_Line ("Correct!"); end if; exit when Guess = Answer; end loop; end Guess;