【例子介绍】
北京赛车倍投计划
【相关图片】
【源码结构】北京赛车倍投计划,仅代学习参考
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Memo1: TMemo;
Button1: TButton;
Edit4: TEdit;
Label4: TLabel;
Edit5: TEdit;
Label5: TLabel;
Label6: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
i,zs,ii:Integer; //循环次数
jj,dz,lr,bq,ll:double;
begin
memo1.Lines.Clear;
jj:=strtofloat(edit1.Text); //奖金
dz:=strtofloat(edit2.Text); //单注金额
zs:=strtoint(edit3.Text); //注数
bq:=0; //本金
ll:=strtofloat(edit4.Text);
ii:=strtoint(edit5.Text);
for i:=1 to ii do
begin
//bq:=bq (dz*zs);
lr:=(jj*dz)-(bq (dz*zs));
if lr>ll then
begin
bq:=bq (dz*zs);
// memo1.Lines.Add('成功' inttostr(i));
memo1.Lines.Add('NO.' inttostr(i) ' 本金:' floattostr(bq) ' 单注金额:' floattostr(dz) ' 注数:' floattostr(zs) '; 利润:' floattostr(round(lr)));
end
else
begin
while(lr<ll)do
begin
dz:=dz 5;
lr:=((jj*dz)-(bq (zs*dz)));
end;
//bq:=bq dz;
bq:=bq (dz*zs);
memo1.Lines.Add('NO.' inttostr(i) ' 本金:' floattostr(bq) ' 单注金额:' floattostr(dz) ' 注数:' floattostr(zs) '; 利润:' floattostr(round(lr)));
end;
end;
end;
end.



评论