tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
15
Task/Binary-digits/AutoIt/binary-digits.autoit
Normal file
15
Task/Binary-digits/AutoIt/binary-digits.autoit
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
ConsoleWrite(IntToBin(50) & @CRLF)
|
||||
|
||||
Func IntToBin($iInt)
|
||||
$Stack = ObjCreate("System.Collections.Stack")
|
||||
Local $b = -1, $r = ""
|
||||
While $iInt <> 0
|
||||
$b = Mod($iInt, 2)
|
||||
$iInt = INT($iInt/2)
|
||||
$Stack.Push ($b)
|
||||
WEnd
|
||||
For $i = 1 TO $Stack.Count
|
||||
$r &= $Stack.Pop
|
||||
Next
|
||||
Return $r
|
||||
EndFunc ;==>IntToBin
|
||||
Loading…
Add table
Add a link
Reference in a new issue