procedure TFormUner.ButtonKuadratClick(Sender: TObject);
var
x,k:real;
begin
x:=StrToFloat(EditX.Text);
k:=x*x;
EditHasil.Text:=FloatToStr(k);
end;
procedure TFormUner.ButtonSinClick(Sender: TObject);
var
x,s:real;
begin
x:=StrToFloat(EditX.Text);
s:=sin(x*pi/180);
EditHasil.Text:=FloatToStr(round(sin(x*pi/180)*100)/100);
end;
procedure TFormUner.ButtonCosClick(Sender: TObject);
var
x,c:real;
begin
x:=StrToFloat(EditX.Text);
c:=cos(x*pi/180);
EditHasil.Text:=FloatToStr(round(cos(x*pi/180)*100)/100);
end;
procedure TFormUner.ButtonTanClick(Sender: TObject);
var
x,t:real;
begin
x:=StrToFloat(EditX.Text);
t:=(sin(x*pi/180))/(cos(x*pi/180));
EditHasil.Text:=FloatToStr(round((sin(x*pi/180))/(cos(x*pi/180))*100)/100);
end;
procedure TFormUner.ButtonAkarClick(Sender: TObject);
var
x,a:real;
begin
x:=StrToFloat(EditX.Text);
a:=Sqrt(x);
EditHasil.Text:=FloatToStr(a);
end;
procedure TFormUner.ButtonLonClick(Sender: TObject);
var
x,n:real;
begin
x:=StrToFloat(EditX.Text);
n:=ln(x);
EditHasil.Text:=FloatToStr(n);
end;
procedure TFormUner.ButtonHapusClick(Sender: TObject);
begin
EditX.Text:=' ';
EditHasil.Text:=' ';
end;
procedure TFormUner.ButtonLogClick(Sender: TObject);
var
x,g:real;
begin
x:=StrToFloat(EditX.Text);
g:=ln(x)/ln(10);
EditHasil.Text:=FloatToStR(g);
end;
procedure TFormUner.ButtonSelesaiClick(Sender: TObject);
begin
Application.Terminate;
end;
end.
Semoga Bermanfaat..
Wenda Alifulloh, Bandung 2013
Tidak ada komentar:
Posting Komentar
Mari Budayakan Berkomentar yang Baik, Sopan, dan Ramah, Sesuai Budaya Indonesia.