Minggu, 30 Oktober 2016

Program Delphi Daily Problem "PARKIR"

procedure TParkir.Button1Click(Sender: TObject);
var
  l,b,p,by:integer;
begin
  l:=strtoint(edit1.text);
  b:=1000;
  p:=500;
  by:= (l*b)+p;
  if l<2 then edit2.Text:='Error';
  if (l>=2) and (l<=6) then edit2.Text:=inttostr(by);
  if (l>6) and (l<=10) then edit2.Text:=inttostr(by+250*(l-6));
  if (l>10) then edit2.Text:=inttostr(by+500*(l-10));



end;

procedure TParkir.Button2Click(Sender: TObject);
begin
Edit1.Text:=' ';
edit2.Text:=' ';
end;

procedure TParkir.Timer1Timer(Sender: TObject);
begin
label9.Left:=label9.Left-30;
 if  label9.Left<=-100 then
 label9.Left := 750;
end;

procedure TParkir.Button3Click(Sender: TObject);
begin
DailyProblems.Show;
Parkir.Hide;
end;

end.

0 komentar:

Posting Komentar