var totalLegs, rabbits, pheasants, combinations: integer;
begin totalLegs := 64;
for rabbits := 0 to totalLegs div 4 do // assuming each rabbit has 4 legs begin pheasants := (totalLegs - rabbits * 4) div 2; // assuming each pheasant has 2 legs combinations := rabbits + pheasants;
program RabbitsAndPheasants;
var
totalLegs, rabbits, pheasants, combinations: integer;
begin
totalLegs := 64;
for rabbits := 0 to totalLegs div 4 do // assuming each rabbit has 4 legs
writeln('Rabbits: ', rabbits, ' Pheasants: ', pheasants);begin
pheasants := (totalLegs - rabbits * 4) div 2; // assuming each pheasant has 2 legs
combinations := rabbits + pheasants;
end;
end.