T
tfox
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.FormShow(Sender: TObject);
var
i,x,y:integer;
begin
Randomize;
for i:=1 to 99 do
begin
x:=random(i);
y:=random(i);
edit1.Text:=inttostr(x)+' + '+inttostr+' =';
strtoint(edit2.Text);
if edit2.Text=x+y then //提示这里错,说是什么不能编译的类型,我不是都定义是数值型的了吗?
rw:='√'
else
rw:=' ×';
end;
end;
procedure TForm1.Edit2KeyPress(Sender: TObject
var Key: Char);
var
x,y:integer;
begin
if key=#13 then
begin
key:=#0;
combobox1.Items.Add(edit1.Text+edit2.Text+rw);
form1.OnShow(self);
edit2.Clear;
end;
end;
var
i,x,y:integer;
begin
Randomize;
for i:=1 to 99 do
begin
x:=random(i);
y:=random(i);
edit1.Text:=inttostr(x)+' + '+inttostr+' =';
strtoint(edit2.Text);
if edit2.Text=x+y then //提示这里错,说是什么不能编译的类型,我不是都定义是数值型的了吗?
rw:='√'
else
rw:=' ×';
end;
end;
procedure TForm1.Edit2KeyPress(Sender: TObject
var Key: Char);
var
x,y:integer;
begin
if key=#13 then
begin
key:=#0;
combobox1.Items.Add(edit1.Text+edit2.Text+rw);
form1.OnShow(self);
edit2.Clear;
end;
end;