Program Pencari Tanggal


ProgramPencariHar;
uses WinDos, Wincrt;
const
days:array [0..6] of string [9]=
(‘Minggu’,’Senin’,’Selasa’,’Rabu’,’Kamis’,’Jumat’,’Sabtu’);

var
th, tg, bl, dow: word;
begin
GetDate(th,bl,tg,dow);
write(‘Hari ini adalah ‘ ,days[dow],’, ‘,tg:0,’ ‘);
case bl of
1:begin
write(‘Januari’);
end;
2:begin
write(‘Februari’);
end;
3:begin
write(‘Maret’);
end;
4:begin
write(‘April’);
end;
5:begin
write(‘Mei’);
end;
6:begin
write(‘juni’);
end;
7:begin
write(‘Juli’);
end;
8:begin
write(‘Agustus’);
end;
9:begin
write(‘September’);
end;
10:begin
write(‘Oktober’);
end;
11:begin
write(‘November’);
end;
12:begin
write(‘Desember’);
end;

end; 
write(‘ ‘,th:0)

end.


Leave a Reply