Mencetak tahun dengan peritah GOTO

program namatahun;
uses crt;
label
a,b,c,d,e,f,1,2,3,4,5,;
begin
writeln('Nama - nama bulan :');
write('Januari');
goto a;
5:
write(',Desember');
goto f;
a:
write(',Februari');
write(',Maret');
goto 1;
2:
write(',juni');
Goto c;
d:
write(',September');
goto 4;
c:
writeln(',Juli,');
goto 3;
b:
write(',Mei');
goto 2;
1:
write(',April');
goto b;
3:
write('Agustus');
goto d;
4:
write(',Oktober');
goto e;
e:
write(',Nofember');
goto 5;
f:
readln;
end.





0 komentar:

Posting Komentar

Pengikut