Dijital Saat Programı

Discussion in 'Programlama' started by sha., Nov 24, 2009.

  1. sha.

    sha. ..daha çirkin, daha huysuz

    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.
     

Share This Page