Pascal Lampu Lalu Lintas

program lampulalulintas;
uses crt;
var lampu: string;
BEGIN
clrscr();
write ('lampu :   ');
     readln(lampu);
     IF lampu='merah' then
          writeln('stop')
     ELSE IF lampu='kuning' then
          writeln('siap-siap')
     ELSE IF lampu='hijau'
          then writeln('Jalan');
     readln;
end.
Comments
0 Comments

No comments: