Program 1 :
PROGRAM enum1;
USES crt;
TYPE
OS=(UNIX,MS_DOS,WIN_XP,WIN_VISTA,WIN_7,WIN_8);
VAR
SisOp:OS;
BEGIN
clrscr;
FOR SisOp:=UNIX TO WIN_8 DO
writeln(Ord(SisOp));
Readln;
END.
Program 2 :
PROGRAM enum1;
USES crt;
TYPE
OS=(UNIX,MS_DOS,WIN_XP,WIN_VISTA,WIN_7,WIN_8);
VAR
SisOp:OS;
PROCEDURE EntriKodeSisOp(VAR SisOp:OS);
VAR
pil:integer;
BEGIN
clrscr;
Writeln('1. UNIX 4. Windows Vista');
Writeln('2. MS-DOS 5. Windows 7');
Writeln('3. Windows XP 6. Windows 8');
Writeln;
REPEAT
write('Pilihan [1...6] : ');
readln(pil)
UNTIL (pil >= 1) AND (pil <= 6);
SisOp:=OS(pil-1);
END;
PROCEDURE TampilkanSisOp(SisOp:OS);
BEGIN
CASE SisOp OF
UNIX : Writeln('UNIX');
MS_DOS : Writeln('MS-DOS');
WIN_XP : Writeln('Windows XP');
WIN_VISTA : Writeln('Windows Vista');
WIN_7 : Writeln('Windows 7');
WIN_8 : Writeln('Windows 8');
END;
END;
BEGIN
EntriKodeSisOp(SisOp);
TampilkanSisOp(SisOp);
Readln;
END.
pleace.visit my link to st3telkom.ac.id
BalasHapusini sangat membantu untuk membuat program
BalasHapus