-- Code of Figure 7.3, page 275 from
-- Kenneth C. Louden, Programming Languages
-- Principles and Practice 2nd Edition
-- Copyright (C) Brooks-Cole/ITP, 2003

with Text_IO; use Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;

procedure Fig7_3 is
   x: integer;
   y: integer := 0;
   z: integer := 0;
begin
   get(x);
   case x - 1 is 
     when 0 =>
	y := 0;
	z := 2;
     when 2 .. 5 =>
	y := 3;
	z := 1;
     when 7 | 9 =>
	z := 10;
     when others =>
	null;
   end case;
   put(x); put(y); put(z); new_line;
end;
