Isikan scrip berikut di button1 (Input):
procedure TForm1.Button1Click(Sender: TObject);
var p, l, t, lu, kel, vol:integer;
begin
p:= StrToInt(Edit1.Text);
Memo1.Clear;
lu:=p*p*6;
kel:=12*p;
vol:=p*p*p;
memo1.lines.add('Alas Kubus = 6 x '+edit1.text +' x ' +edit1.text);
memo1.Lines.add(' = ' +inttostr(lu));
memo1.Lines.add('Keliling Kubus = 12 x ' + edit1.text);
memo1.Lines.add(' = ' +inttostr(kel));
memo1.Lines.add('Volume Kubus = ' +edit1.text +' x ' +edit1.text +' x ' +edit1.text);
memo1.Lines.add(' = ' +inttostr(vol));
end;
Semoga tutorial yg singkat ini dapat bermanfaat............

0 comments:
Post a Comment