tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
13
Task/Binary-digits/REXX/binary-digits-1.rexx
Normal file
13
Task/Binary-digits/REXX/binary-digits-1.rexx
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/*REXX program demonstrates converting decimal ───► binary. */
|
||||
numeric digits 1000
|
||||
|
||||
x.1 = 0
|
||||
x.2 = 5
|
||||
x.3 = 50
|
||||
x.4 = 9000
|
||||
|
||||
do j=1 for 4
|
||||
y = x2b(d2x(x.j)) + 0
|
||||
say right(x.j,20) 'decimal, and in binary:' y
|
||||
end /*j*/
|
||||
/*stick a fork in it, we're done.*/
|
||||
13
Task/Binary-digits/REXX/binary-digits-2.rexx
Normal file
13
Task/Binary-digits/REXX/binary-digits-2.rexx
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/*REXX program demonstrates converting decimal ───► binary. */
|
||||
|
||||
x.1 = 0
|
||||
x.2 = 5
|
||||
x.3 = 50
|
||||
x.4 = 9000
|
||||
|
||||
do j=1 for 4
|
||||
y = strip( x2b( d2x( x.j )), 'L', 0)
|
||||
if y=='' then y=0
|
||||
say right(x.j,20) 'decimal, and in binary:' y
|
||||
end /*j*/
|
||||
/*stick a fork in it, we're done.*/
|
||||
11
Task/Binary-digits/REXX/binary-digits-3.rexx
Normal file
11
Task/Binary-digits/REXX/binary-digits-3.rexx
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*REXX program demonstrates converting decimal ───► binary. */
|
||||
|
||||
x.1 = 0
|
||||
x.2 = 5
|
||||
x.3 = 50
|
||||
x.4 = 9000
|
||||
do j=1 for 4
|
||||
y = word( strip( x2b( d2x( x.j )), 'L', 0) 0, 1)
|
||||
say right(x.j,20) 'decimal, and in binary:' y
|
||||
end /*j*/
|
||||
/*stick a fork in it, we're done.*/
|
||||
Loading…
Add table
Add a link
Reference in a new issue