Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Binary-digits/ALGOL-M/binary-digits.alg
Normal file
18
Task/Binary-digits/ALGOL-M/binary-digits.alg
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
begin
|
||||
procedure writebin(n);
|
||||
integer n;
|
||||
begin
|
||||
procedure inner(x);
|
||||
integer x;
|
||||
begin
|
||||
if x>1 then inner(x/2);
|
||||
writeon(if x-x/2*2=0 then "0" else "1");
|
||||
end;
|
||||
write(""); % start new line %
|
||||
inner(n);
|
||||
end;
|
||||
|
||||
writebin(5);
|
||||
writebin(50);
|
||||
writebin(9000);
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue