Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
20
Task/Twos-complement/PureBasic/twos-complement.basic
Normal file
20
Task/Twos-complement/PureBasic/twos-complement.basic
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
Define d.l
|
||||
d = 1234567
|
||||
|
||||
Dim b.l(8)
|
||||
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
|
||||
|
||||
OpenConsole()
|
||||
For i = 0 To ArraySize(b()) - 1
|
||||
PrintN(Str(b(i)) + " -> " + Str(-b(i)))
|
||||
Next i
|
||||
Input()
|
||||
CloseConsole()
|
||||
Loading…
Add table
Add a link
Reference in a new issue