Pascal dilinde yazılmış güzel bir dijital saat
Kod :
Plt dijital saat
uses crt,dos;
type
datetimetype=string[8];
var
reg:registers;
h,m,s,w,time:datetimetype;
i:integer;
begin
clrscr;
repeat
reg.ax:=$2c00;
intr($21,reg);
str(hi(reg.cx):2,h);
str(lo(reg.cx):2,m);
str(hi(reg.dx):2,s);
w:=h+':'+m+':'+s;
for i:=1 to length(w) do
if w=' ' then w:='0';
gotoxy(30,10); write(w);
delay(500);
clrscr;
until keypressed;
readkey;
end.
SAYGILAR...
Kod :
Plt dijital saat
uses crt,dos;
type
datetimetype=string[8];
var
reg:registers;
h,m,s,w,time:datetimetype;
i:integer;
begin
clrscr;
repeat
reg.ax:=$2c00;
intr($21,reg);
str(hi(reg.cx):2,h);
str(lo(reg.cx):2,m);
str(hi(reg.dx):2,s);
w:=h+':'+m+':'+s;
for i:=1 to length(w) do
if w=' ' then w:='0';
gotoxy(30,10); write(w);
delay(500);
clrscr;
until keypressed;
readkey;
end.
SAYGILAR...