Monday, December 10, 2007

How to work with CASE by example

How to work with CASE by example

To work with CASE by example

Example:

program Welcome;

uses

Wincrt;

var

a:char;

begin

Writeln('Enter the char: ');

Read(a);

case a of

'm': Writeln('You are the boy');

'f': Writeln('You are the girl');

end;

end.

Output:

No comments: