|
Programalama Dilleri
|
|
|
|
|
|
|
|
|
|
|
|
|
Videolu Ders Anlatım
|
|
|
|
|
|
|
|
İşlemler
|
|
|
|
|
|
|
|
|
PROGRAM Mehmet;
USES CRT,GRAPH;
label frst;
procedure alarm;
begin
sound(1000);delay(50);sound(1000);delay(50);nosound;
end;
VAR
GD,GM:INTEGER;
y,k,i:integer;
key:char;
lH1,lM1,lSC1,gen :string;
lH,lM,lSC{:string;},
H,M,SC:integer;
st,s1,s2,s3:string;
BEGIN
clrscr;
detectgraph(gd,gm);
INITGRAPH(GD,GM,'TPBGI');
h:=0;m:=0;sc:=0;
for i:=0 to 60 do
begin
delay (3500);
if i=60 then
begin
inc(k);i:=0;
end;
if k=60 then begin
inc(y);k:=0;
end;
str(y:0,s1);
str(k:0,s2);
str(i:0,s3);
st:=s1+':'+s2+':'+s3;
cleardevice;
settextstyle(4,0,20);
outtextxy(150,250,st);
outtextxy(10,100,'sezer');
if y>12 then
y:=1;
if keypressed then key:=readkey;
case key of
#9:begin
frst:
OutTextXY(1,1,'Enter the Alarm Time:hours,minute,second');
Readln(lh,lm,lsc);
if (lh in[0..23])or(lm in[0..60])or(lsc in[0..60])then
begin
str(lh:0,lh1);
str(lm:0,lm1);
str(lsc:0,lsc1);
gen:=lh1+':'+lm1+':'+lsc1;
OutTextXy(textWidth('Enter the Alarm Time:hours,minute,second')+1,
TextHeight('Enter the Alarm Time:hours,minute,second')+1,gen);
end
else
goto frst;
end;
#27:halt(0);
end;
delay(5000);
if (y=lh)and(k=lm)and(i=lsc) then
Alarm;
end;
end
|
|
|
|
|
|
|
|
40490 ziyaretçi (65999 klik) |
|
|
|
|