Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
17
Task/Twos-complement/QB64/twos-complement.qb64
Normal file
17
Task/Twos-complement/QB64/twos-complement.qb64
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
Dim d As Long
|
||||
d = 1234567
|
||||
|
||||
Dim b(8) As Long
|
||||
b(0) = -d
|
||||
b(1) = -d + 1
|
||||
b(2) = -2
|
||||
b(3) = -1
|
||||
b(4) = 0
|
||||
b(5) = 1
|
||||
b(6) = 2
|
||||
b(7) = d - 2
|
||||
b(8) = d - 1
|
||||
|
||||
For i = 0 To UBound(b)
|
||||
Print b(i); " -> "; -b(i) ' * -1
|
||||
Next i
|
||||
Loading…
Add table
Add a link
Reference in a new issue