百钱买百鸡过程。 procedure TForm1.Button1Click(Sender: TObject); var hen, cock, chick: integer; answer: string; begin for cock:=0 to 20 do for hen:=0 to 33 do begin chick:=100-hen-cock;//鸡雏的数目 if chick mod 3 = 0 then//鸡雏的数目必须是3的倍数 if cock*5+hen*3+chick div 3