Contoh script Java Segitiga angka

unit segi3menurun;

interface

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

type
  TSgtigaMENURUn = class(TForm)
    Button1: TButton;
    Memo1: TMemo;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  SgtigaMENURUn: TSgtigaMENURUn;

implementation

{$R *.dfm}

procedure TSgtigaMENURUn.Button1Click(Sender: TObject);
var a, r : integer;
   u : String ;
begin
       Memo1.Clear ;
      for a:=10 Downto 1 do

      begin
        u := '' ;
              for r:= 10 Downto a do
              begin
                  u := u + ' ' + inttostr(r);

          end;
          Memo1.Lines.Add (u);
      end;

       for a:=2 to 10 do

          begin
          u := '' ;
                for r:= 10 Downto a do
                begin
                    u := u + ' ' + inttostr(r);
                end;
                Memo1.Lines.Add (u);
          end;
end;

end.



0 Response to "Contoh script Java Segitiga angka"

Post a Comment