program n_to_01001 var integer procedure QW integer begin while div do

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
program n_to_01001;
var n:integer;
procedure QW (q:integer);
begin
while q div 2 >0 do
begin
if (q mod 2 =1) then
begin
write ('1');
q:=q div 2;
end
else
write ('0');
q:=q div 2;
QW (q);
end;
end;
Begin
read (n);
QW (n);
end.