Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
12
Task/Binary-digits/Ring/binary-digits.ring
Normal file
12
Task/Binary-digits/Ring/binary-digits.ring
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
see "Number to convert : "
|
||||
give a
|
||||
n = 0
|
||||
while pow(2,n+1) < a
|
||||
n = n + 1
|
||||
end
|
||||
|
||||
for i = n to 0 step -1
|
||||
x = pow(2,i)
|
||||
if a >= x see 1 a = a - x
|
||||
else see 0 ok
|
||||
next
|
||||
Loading…
Add table
Add a link
Reference in a new issue