MODULE Monat;
IMPORT Display;
PROCEDURE ProgMain*;
VAR ch:CHAR;
monat: INTEGER ;
BEGIN
Display. WriteStr ("Dieses Programm sagt Ihnen, wieviele Tage ein Monat hat:");
Display. WriteLn;
Display. WriteStr ("Bitte Monatsnummer eingeben: ");
Display. ReadInt (monat,10,ch);
Display. WriteLn;
CASE monat OF
1,3,5,7,8,10,12: Display. WriteStr ("31 Tage");
| 4,6,9,11 : Display. WriteStr ("30 Tage");
| 2 : Display. WriteStr ("28 oder 29 Tage");
END;
Display. WriteLn;
Display. ReadChar (ch);
END ProgMain;
END Monat.
Zurück zum Thema "Mehrfachauswahl"