jfaumt 发表于 2011-11-1 12:31:06

九九乘法表

unit 九九;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
type
TForm1 = class(TForm)
    memo1: TMemo;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
private
    { Private declarations }
public
    { Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
i, j: Integer;
temp: Integer;
begin
for i := 1 to 9 do
begin
    for j := 1 to i do
    begin
      temp := j * i;
      if j < i then
      memo1.Lines.text := memo1.Lines.text + inttostr(j) + 'x' + inttostr(i) + '=' + inttostr(temp) + '|'
      else
      memo1.Lines.text := memo1.Lines.text + inttostr(j) + 'x' + inttostr(i) + '=' + inttostr(temp) + '|' + #13#10;
    end;
end;
end;
end.

清/wx风 发表于 2011-11-1 12:46:23

今天我也刚学第一课

C语言 发表于 2011-11-1 17:43:04

牛B, {:5_105:}

wuge1986 发表于 2011-11-30 19:09:31

怎么我打开时提示说工程没有被指定啊

Root_Null 发表于 2013-4-13 10:35:32

强烈支持楼主ing……....{:5_101:}

illzt 发表于 2013-4-13 13:51:30

激动人心,无法言表!

Angel丶L 发表于 2015-2-1 16:42:20

支持楼主发扬Delphi

心驰神往 发表于 2020-12-9 16:45:48

也可以直接用canvas
页: [1]
查看完整版本: 九九乘法表