procedure TForm1.Button1Click(Sender: TObject);
begin
if hasil.Caption=’0′ then
hasil.Caption:=”;
if Hasil.Caption’ ‘ then
if MemLogic=’0′ then
begin
MemLogic:=’1′;
if MemOperator” then Hasil.Caption:=’1′ else
Hasil.Caption:=’1′;
end
else

Hasil.Caption:=Hasil.Caption+’1′;
end;

procedure TForm1.Button10Click(Sender: TObject);
begin
if hasil.Caption=’0′ then
hasil.Caption:=”;
if Hasil.Caption’ ‘ then
if MemLogic=’0′ then
begin
if MemOperator” then Hasil.Caption:=’0′ else
if Hasil.Caption=’0′ then Hasil.Caption:=’0′ else
begin
Hasil.Caption:=Hasil.Caption+’0′;
MemLogic:=’1′;
end;
end

else
Hasil.Caption:=Hasil.Caption+’0′;
end;
(download filenya disini)
procedure TForm1.Button2Click(Sender: TObject);
begin
if hasil.Caption=’0′ then
hasil.Caption:=”;
if Hasil.Caption’ ‘ then
if MemLogic=’0′ then
begin
MemLogic:=’2′;
if MemOperator” then Hasil.Caption:=’2′ else
Hasil.Caption:=’2′;
end
else
Hasil.Caption:=Hasil.Caption+’2′;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
if hasil.Caption=’0′ then
hasil.Caption:=”;
if Hasil.Caption’ ‘ then
if MemLogic=’0′ then
begin

MemLogic:=’1′;
if MemOperator’ ‘ then Hasil.Caption:=’3′ else
Hasil.Caption:=’3′;
end
else

Hasil.Caption:=Hasil.Caption+’3′;
end;

procedure TForm1.Button4Click(Sender: TObject);
begin
if
hasil.Caption=’0′ then
hasil.Caption:=”;
if Hasil.Caption’ ‘ then
if
MemLogic=’0′ then
begin

MemLogic:=’1′;
if MemOperator” then Hasil.Caption:=’4′ else
Hasil.Caption:=’4′;
end
else

Hasil.Caption:=Hasil.Caption+’4′;
end;

procedure TForm1.Button5Click(Sender: TObject);
begin
if hasil.Caption=’0′ then
hasil.Caption:=”;
if Hasil.Caption’ ‘ then
if
MemLogic=’0′ then
begin

MemLogic:=’1′;
if MemOperator” then Hasil.Caption:=’5′ else
Hasil.Caption:=’5′;
end
else

Hasil.Caption:=Hasil.Caption+’5′;
end;

procedure TForm1.Button6Click(Sender: TObject);
begin
if
hasil.Caption=’0′ then
hasil.Caption:=”;
if Hasil.Caption’ ‘ then
if
MemLogic=’0′ then
begin

MemLogic:=’1′;
if MemOperator” then Hasil.Caption:=’6′ else
Hasil.Caption:=’6′;
end
else

Hasil.Caption:=Hasil.Caption+’6′;
end;

procedure TForm1.Button7Click(Sender: TObject);
begin
if
hasil.Caption=’0′ then
hasil.Caption:=”;
if Hasil.Caption’ ‘ then
if
MemLogic=’0′ then
begin

MemLogic:=’1′;
if MemOperator” then Hasil.Caption:=’7′ else
Hasil.Caption:=’7′;
end
else

Hasil.Caption:=Hasil.Caption+’7′;
end;

procedure TForm1.Button8Click(Sender: TObject);
begin
if
hasil.Caption=’0′ then
hasil.Caption:=”;
if Hasil.Caption’ ‘ then
if
MemLogic=’0′ then
begin

MemLogic:=’1′;
if MemOperator” then Hasil.Caption:=’8′ else
Hasil.Caption:=’8′;
end
else

Hasil.Caption:=Hasil.Caption+’8′;
end;

procedure TForm1.Button9Click(Sender: TObject);
begin
if
hasil.Caption=’0′ then
hasil.Caption:=”;
if Hasil.Caption’ ‘ then
if
MemLogic=’0′ then
begin
MemLogic:=’1′;
if MemOperator” then Hasil.Caption:=’9′ else
Hasil.Caption:=’9′;
end
else

Hasil.Caption:=Hasil.Caption+’9′;
end;

procedure TForm1.Button11Click(Sender: TObject);
var
sudut : real;
begin
if
Hasil.Caption’ ‘ then
begin

sudut:=strtofloat(Hasil.Caption);
sudut:=sudut*pi/180;
Hasil.Caption := floattostr(sin(sudut));
end;
end;

procedure TForm1.Button25Click(Sender: TObject);
begin
MemOperator:=”;
if (hasil.Caption”) then
if
MemLogic=’0′ then MemOperator:=’-‘ else
if
(MemOperator=”) then
begin

MemOperator:=’-‘;
MemLogic:=’0’;
MemAngka:=hasil.Caption;
end
else
begin
if
MemOperator=’+’ then hasil.Caption:=floattostr(strtofloat(MemAngka)+strtofloat(hasil.Caption));
if MemOperator=’-‘ then hasil.Caption:=floattostr(strtofloat(MemAngka)-strtofloat(hasil.Caption));
if MemOperator=’x’ then hasil.Caption:=floattostr(strtofloat(MemAngka)*strtofloat(hasil.Caption));
if MemOperator=’/’ then hasil.Caption:=floattostr(strtofloat(MemAngka)/strtofloat(hasil.Caption));
if MemOperator=’mod’ then hasil.Caption:=inttostr(strtoint(MemAngka) mod strtoint(hasil.Caption));
if MemOperator=’div’ then hasil.Caption:=inttostr(strtoint(MemAngka)div strtoint(hasil.Caption));
if MemOperator=’^’ then hasil.Caption:=floattostr(exp(strtofloat(hasil.Caption)*ln(strtofloat(MemAngka))));
MemAngka:=hasil.Caption;
MemOperator:=’-‘;
MemLogic:=’0’;
end;
end;

procedure TForm1.Button24Click(Sender: TObject);
begin
if
MemOperator=’+’ then hasil.Caption:=floattostr(strtofloat(MemAngka)+strtofloat(hasil.Caption));
if MemOperator=’-‘ then hasil.Caption:=floattostr(strtofloat(MemAngka)-strtofloat(hasil.Caption));
if MemOperator=’x’ then hasil.Caption:=floattostr(strtofloat(MemAngka)*strtofloat(hasil.Caption));
if MemOperator=’/’ then hasil.Caption:=floattostr(strtofloat(MemAngka)/strtofloat(hasil.Caption));
MemAngka:=hasil.Caption;
MemLogic:=’0′;
end;

procedure TForm1.Button27Click(Sender: TObject);
begin
hasil.Caption:=’0′;
MemLogic:=”;
MemAngka:=”;
MemOperator:=”;
end;
procedure TForm1.Button18Click(Sender: TObject);
begin
if
hasil.Caption” then
hasil.Caption:=hasil.Caption + ‘.’;
end;

procedure TForm1.Button15Click(Sender: TObject);
begin
MemOperator:=”;
if (hasil.Caption”) then
if
MemLogic=’0′ then MemOperator:=’+’ else
if
(MemOperator=”) then
begin

MemOperator:=’+’;
MemLogic:=’0′;
MemAngka:=hasil.Caption;
end
else
begin

if MemOperator=’+’ then hasil.Caption:=floattostr(strtofloat(MemAngka)+strtofloat(hasil.Caption));
if MemOperator=’-‘ then hasil.Caption:=floattostr(strtofloat(MemAngka)-strtofloat(hasil.Caption));
if MemOperator=’x’ then hasil.Caption:=floattostr(strtofloat(MemAngka)*strtofloat(hasil.Caption));
if MemOperator=’/’ then hasil.Caption:=floattostr(strtofloat(MemAngka)/strtofloat(hasil.Caption));
if MemOperator=’mod’ then hasil.Caption:=inttostr(strtoint(MemAngka) mod strtoint(hasil.Caption));
if MemOperator=’div’ then hasil.Caption:=inttostr(strtoint(MemAngka)div strtoint(hasil.Caption));
if MemOperator=’^’ then hasil.Caption:=floattostr(exp(strtofloat(hasil.Caption)*ln(strtofloat(MemAngka))));
MemAngka:=hasil.Caption;
MemOperator:=’+’;
MemLogic:=’0′;
end;
end;

procedure TForm1.Button29Click(Sender: TObject);
begin
MemOperator:=”;
if (hasil.Caption”) then
if
MemLogic=’0′ then MemOperator:=’x’ else
if
(MemOperator=”) then
begin

MemOperator:=’x’;
MemLogic:=’0′;
MemAngka:=hasil.Caption;
end
else
begin

if MemOperator=’+’ then hasil.Caption:=floattostr(strtofloat(MemAngka)+strtofloat(hasil.Caption));
if MemOperator=’-‘ then hasil.Caption:=floattostr(strtofloat(MemAngka)-strtofloat(hasil.Caption));
if MemOperator=’x’ then hasil.Caption:=floattostr(strtofloat(MemAngka)*strtofloat(hasil.Caption));
if MemOperator=’/’ then hasil.Caption:=floattostr(strtofloat(MemAngka)/strtofloat(hasil.Caption));
if MemOperator=’mod’ then hasil.Caption:=inttostr(strtoint(MemAngka) mod strtoint(hasil.Caption));
if MemOperator=’div’ then hasil.Caption:=inttostr(strtoint(MemAngka)div strtoint(hasil.Caption));
if MemOperator=’^’ then hasil.Caption:=floattostr(exp(strtofloat(hasil.Caption)*ln(strtofloat(MemAngka))));
MemAngka:=hasil.Caption;
MemOperator:=’x’;
MemLogic:=’0′;
end;
end;

procedure TForm1.Button23Click(Sender: TObject);
begin
MemOperator:=”;
if (hasil.Caption”) then
if
MemLogic=’0′ then MemOperator:=’/’ else
if
(MemOperator=”) then
begin

MemOperator:=’/’;
MemLogic:=’0′;
MemAngka:=hasil.Caption;
end
else
begin

if MemOperator=’+’ then hasil.Caption:=floattostr(strtofloat(MemAngka)+strtofloat(hasil.Caption));
if MemOperator=’-‘ then hasil.Caption:=floattostr(strtofloat(MemAngka)-strtofloat(hasil.Caption));
if MemOperator=’x’ then hasil.Caption:=floattostr(strtofloat(MemAngka)*strtofloat(hasil.Caption));
if MemOperator=’/’ then hasil.Caption:=floattostr(strtofloat(MemAngka)/strtofloat(hasil.Caption));
if MemOperator=’mod’ then hasil.Caption:=inttostr(strtoint(MemAngka) mod strtoint(hasil.Caption));
if MemOperator=’div’ then hasil.Caption:=inttostr(strtoint(MemAngka)div strtoint(hasil.Caption));
if MemOperator=’^’ then hasil.Caption:=floattostr(exp(strtofloat(hasil.Caption)*ln(strtofloat(MemAngka))));
MemAngka:=hasil.Caption;
MemOperator:=’/’;
MemLogic:=’0′;
end;
end;

procedure TForm1.Button19Click(Sender: TObject);
begin
if
hasil.Caption” then
hasil.Caption:=floattostr(sqrt(strtofloat(hasil.Caption)));
end;

procedure TForm1.Button12Click(Sender: TObject);
var
sudut:real;
begin
if hasil.Caption” then
begin

sudut:=strtofloat(hasil.Caption);
sudut:=sudut*pi/180;
hasil.Caption := floattostr(cos(sudut));
MemLogic :=’0′;
end;
end;

procedure TForm1.Button13Click(Sender: TObject);
var
sudut,a,b:real;
begin
if hasil.Caption” then
begin
sudut:=strtofloat(hasil.Caption);
sudut:=sudut*pi/180;
a:=sin(sudut);
b:=cos(sudut);
sudut:=a/b;
hasil.Caption := floattostr((sudut));
MemLogic :=’0′;
end;
end;

procedure TForm1.Button20Click(Sender: TObject);
begin
hasil.Caption:=MemSimpan;
end;

procedure TForm1.Button21Click(Sender: TObject);
begin
MemSimpan:=”;
end;

procedure TForm1.Button22Click(Sender: TObject);
begin
MemSimpan:=hasil.Caption;
end;

procedure TForm1.Button28Click(Sender: TObject);
var
angka:real;
begin
angka:=StrToFloat(hasil.Caption);
if (angka>0) then
angka:=(-angka)
else
angka:=angka+(-angka)+(-angka);
hasil.Caption:=FloatToStr(angka);
end;

procedure TForm1.Button26Click(Sender: TObject);
begin
Close;
end;

procedure TForm1.Button14Click(Sender: TObject);
var
angka:real;
begin
angka:=StrToFloat(hasil.Caption);
angka:=ln(10)/ln(angka);
hasil.Caption:=FloatToStr(angka);
end;

procedure TForm1.Button17Click(Sender: TObject);
var
pangkat: real;
begin
pangkat:=StrToFloat(hasil.Caption);
pangkat:=sqr(pangkat);
hasil.Caption:=FloatToStr(pangkat)
end;

procedure TForm1.Button16Click(Sender: TObject);
var
angka:real;
begin
angka:=StrToFloat(hasil.Caption);
angka:=angka/100;
hasil.Caption:=FloatToStr(angka);
end;

end.

{www.slem.co.cc)