25-12-2008, 06:49 PM
توفير قليل من الذاكرة بالاستغناء عن المتغير s
PHP كود :
Function Int2Bin(x: Integer):String;
Begin
result:='';
repeat
case x mod 2 of
0 : result:='0'+ result;
1 : result:='1'+ result;
end;
x := x div 2;
until x=0;
End;

