ÎÊÌâ ÊÇÎÒ²»»áд°¡ Äãд¹ýÂð ¿ÉÒÔ·¢¶Î´úÂë ÎҲο¼²Î¿¼Âð ¼òµ¥µÄÓÃforÑ»·£¬Ò»¸ö¸öÈ¥ÅÅÁÐ for i := 1 to 8 do begin for j:= (i+1) to 8 do begin Memo1.Lines.Add(IntToStr(a[i]) + ',' + IntToStr(a[j])); end; end;
procedure TForm1.Button1Click(Sender: TObject); var s1,s2:string; str,str1:TStrings; i,j,m,n:Integer; begin s1:=Trim(self.Edit1.Text);//ÕâÀï¾ÍÊÇÄãµÄ×Ö·û´®¡®4£¬6£¬8£¬12£¬16£¬17£¬20£¬28£¬29£¬30£¬31¡¯ s2:=Trim(self.Edit2.Text);//ÕâÀïÊäÈë8 if (s1='') or (s2='') then Exit; str:=TStringList.Create; str.Clear; str1:=TStringList.Create; str1.Clear; self.getn(s1,'',StrToInt(s2),str); i:=str.Count; self.Memo1.Lines.Clear; for j:=0 to i-1 do begin s1:=str.Strings[j]; self.Memo1.Lines.Add(s1); end; end;