-- Item : Random Integer Example -- Reference : Ada95 Language Reference Manual, section A.5.2 -- Author : Paul Stachour, stachour@winternet.com -- Version : 1.0, 1999/Jan/18 -- For : ICS340, Winter 199, Metro State, Minnesota -- Style : Ada95 -- Protection: Permssion for use in any non-profit activity granted. with Ada.Text_IO; use Ada.Text_IO; with Ada.Numerics.Discrete_Random; procedure ch7_ri is -- example to show Ada Random Integer package subtype Die is INTEGER range 1..6; package Random_Die is new Ada.Numerics.Discrete_Random(Die); use Random_Die; Die1: Die; Die2: Die; G: Generator; begin for I in 1 .. 10 loop Die1 := Random(G); Die2 := Random(G); Put_Line( "You got a " & Integer'Image(Die1) & " on the first die and a " & Integer'Image(Die2) & " on the second die."); end loop; end ch7_ri; -- Chapter 7 Random Example.