-->

PROGRAM KUBUS VIA DELPHI 2010

Hanya dengan menginputkan nilai rusuk , makan kita akan dapat mengetahui volume,keliling,luas permukaan ,dan luas salah satu sisi dari kubus.
nah ini dia outputnya





ini dia skripnya :
unit Unit2;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, pngimage, ExtCtrls;

type
  TForm2 = class(TForm)
    GroupBox1: TGroupBox;
    Edit1: TEdit;
    Edit2: TEdit;
    Edit3: TEdit;
    Edit4: TEdit;
    Edit5: TEdit;
    Button1: TButton;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Image1: TImage;
    Label6: TLabel;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

implementation

{$R *.dfm}

procedure TForm2.Button1Click(Sender: TObject);
var rusuk,volume,keliling,luasper,lusel: real;

begin
rusuk := StrToFloat(edit1.Text )   ;
volume := sqr rusuk * rusuk ;
keliling := 12 * rusuk ;
luasper  := 6 * rusuk * rusuk ;
lusel  := rusuk * rusuk ;
edit2.Text := FloatToStr(volume)  ;
edit3.Text  :=  FloatToStr (keliling );
edit4.Text := FloatToStr(luasper )  ;
edit5.Text := FloatToStr(lusel) ;



end;

end.

0 Response to "PROGRAM KUBUS VIA DELPHI 2010"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel