148074Sbostic(* 2*62154Sbostic * Copyright (c) 1980, 1993 3*62154Sbostic * The Regents of the University of California. All rights reserved. 448074Sbostic * 548074Sbostic * %sccs.include.redist.c% 648074Sbostic * 7*62154Sbostic * @(#)case.p 8.1 (Berkeley) 06/06/93 848074Sbostic *) 948074Sbostic 1048074Sbosticprogram casetest(input, output); 1148074Sbosticvar c : char; 1248074Sbostic s : 0..1000; 1348074Sbostic i : integer; 1448074Sbosticbegin 1548074Sbostic c := 'a'; 1648074Sbostic case c of 1748074Sbostic 'b': writeln('b'); 1848074Sbostic 'c': writeln('c'); 1948074Sbostic 'a': writeln('a'); 2048074Sbostic end; 2148074Sbostic s := 3; 2248074Sbostic case s of 2348074Sbostic 5: writeln('5'); 2448074Sbostic 3: writeln('3'); 2548074Sbostic 7: writeln('7'); 2648074Sbostic end; 2748074Sbostic i := 1001; 2848074Sbostic case i of 2948074Sbostic 0: writeln('0'); 3048074Sbostic -1: writeln('-1'); 3148074Sbostic 1001: writeln('1001'); 3248074Sbostic -1001: writeln('-1001'); 3348074Sbostic end; 3448074Sbosticend. 35