WITH Ada.Text_IO;
WITH Ada.Integer_Text_IO;
PROCEDURE Distance IS
------------------------------------------------------------------
--|
--| Finds distance traveled, given travel time and average speed
--|
--| Author: Michael B. Feldman, The George Washington University
--| Last Modified: July 1995
--|
------------------------------------------------------------------
 
  How_Long : Natural;
  How_Fast : Natural;
  How_Far  : Natural;
 
BEGIN -- Distance
 
  -- prompt user for hours and average speed
  Ada.Text_IO.Put
    (Item => "How many hours will you be driving (integer) ? ");
  Ada.Integer_Text_IO.Get (Item => How_Long);
  Ada.Text_IO.Put
    (Item => "At what average speed (miles per hour, integer) ? ");
  Ada.Integer_Text_IO.Get (Item => How_Fast);
 
  -- compute distance driven
  How_Far := How_Fast * How_long;
 
  -- display results
  Ada.Text_IO.Put (Item => "You will travel about ");
  Ada.Integer_Text_IO.Put (Item => How_Far);
  Ada.Text_IO.Put (Item => " miles");
  Ada.Text_IO.New_Line;
 
END Distance;