26-12-2008, 12:15 AM
إقتباس :ملاحظة: لم تعلق على حلي ان كان صحيح او خطأ كونك صاحب التمرينالحل 100 % صحيح . صغير الحجم و مفيد . و تمت الاستفادة منه ان شاء الله .

إقتباس :من الأفضل ان تكون الحلول على صيغة Functions ليسهل تصديرها.تم تحويلها الى Functions .

PHP كود :
Function SystemBinary(Binary:Integer):String;
var
I,S,Z,L,Count2:integer;
LblStr:Array [0..1000]of Integer;
begin
Result:='';
for I := 0 to Binary do
begin
if S < 1 then Break;
S:=(Binary div 2);
Z:=(Binary mod 2);
If Z=0 then L:=0 else L:=1;
LblStr[I]:= L;
Binary:=S;
Count2:=I;
end;
For I:=0 to Count2 do
Result:=Result+IntToStr(LblStr[I]);
end;

