16,748
社区成员
发帖
与我相关
我的任务
分享
procedure TForm1.Button1Click(Sender: TObject);
var i,j,k,l,LL:integer;
S:string;
begin
LL:=0;
for i:=-99 to 99 do
for j:=-99 to 99 do
for k:=-99 to 99 do
for l:=-99 to 99 do
begin
if (I-j)*(I-j)+(k-l)*(k-l)=50 then
begin
LL:=LL+1;
S:=Inttostr(LL)+'、('+Inttostr(i)+'*'+Inttostr(j)+')*('+Inttostr(i)+'*'+Inttostr(j)+')'+
'('+Inttostr(k)+'*'+Inttostr(l)+')*('+Inttostr(k)+'*'+Inttostr(l)+')';
Memo1.Lines.Add(S);
end;
end;
end;
有很多解......