Delphi - Random Combination (Math)
问题 I have a BIG problem here and do not even know how to start... In short explanation, I need to know if a number is in a set of results from a random combination... Let me explain better: I created a random "number" with 3 integer chars from 1 to 8, like this: procedure TForm1.btn1Click(Sender: TObject); var cTmp: Char; sTmp: String[3]; begin sTmp := ''; While (Length(sTmp) < 3) Do Begin Randomize; cTmp := IntToStr(Random(7) + 1)[1]; If (Pos(cTmp, sTmp) = 0) Then sTmp := sTmp + cTmp; end; edt1